We built some toolchains that you can use to try out this feature. There are still a bunch of rough edges, but you can use those to get a sense of how things fit together. Here are a few little sample programs to get you started:
- Concurrent merge sort: a direct port of the merge-sort implementation from the Swift Algorithm Club to use async/await.
- Actor counters: a little bit of asynchronous code that uses actors to provide shared counter, with a bunch of worker tasks poking at them.
The toolchains are here. They're like the ones from swift.org, so you install them the same way, but newer:
Right now, there's an amusing-but-illustrative difference between macOS and Linux: the Linux toolchains are using a cooperative, single-threaded executor while the macOS one is using Dispatch for parallel execution. It's due to some temporarily layering issues in the implementation, but also shows how the model works both ways. We'll be fixing this bug soon on the Linux side.
Have fun!
Doug
[EDIT: Updated toolchains to versions that enable concurrency by default]