Friday, September 29, 2023
HomeProgrammingFashionable Concurrency in Swift | Kodeco

Fashionable Concurrency in Swift | Kodeco

This part tells you a couple of issues you want to know earlier than you get began, reminiscent of what you’ll want for {hardware} and software program, the place to search out the mission information for this guide, and extra.

Get to know the trendy Swift concurrency mannequin, then take a deep dive into async code by engaged on a real-time inventory buying and selling mission.

Go into extra element about how the async/await syntax and the cooperative asynchronous execution work. Moreover, it introduces the utilization of “async let” to design concurrent code and the “Process” sort which encapsulates asynchronous execution within the fashionable concurrency mannequin.

Work with async sequences in additional element, proxying Mix to async/await code and managing async duties.

Create customized asynchronous sequences by leveraging AsyncStream, which helps you to wrap current asynchronous work in your app as an asynchronous sequence with out breaking a sweat.

Find out about continuations, that are a option to manually handle suspended features. You will use them to bridge between current non-async/await code and fashionable, concurrent APIs.

Develop an asynchronous testing infrastructure and study all of the ins-and-outs of testing asynchronous code within the new concurrency mannequin. You will wrap up by including unit exams to the Blabber mission you labored on in earlier chapters.

Create dynamic concurrency with Process Teams, which allow you to run an arbitrary variety of duties concurrently and affords a pure sequence interface to entry and iterate over the outcomes of these duties.

Actor is the brand new Swift sort that transparently protects its mutable state from knowledge races in a synchronized container, making concurrent programming a lot safer.

Now that actors, you may find out about a particular subset of them — international actors, which permit straightforward and secure entry to shared sources from wherever in your app.

Create a distributed system that makes use of actors to execute concurrent duties on a number of units over the native community.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments