Skip to content

Instantly share code, notes, and snippets.

@wookiee
Last active May 20, 2021 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wookiee/e489e68c24d2767b4d462d959638f8e7 to your computer and use it in GitHub Desktop.
Save wookiee/e489e68c24d2767b4d462d959638f8e7 to your computer and use it in GitHub Desktop.
Swift Structured Concurrency Proposals
  • async/await and Structured Concurrency introduce the syntactical building blocks (including the Task type) for writing asynchronous code using Swift-native language features.
  • There is a WIP standalone proposal to add async let syntax to greatly reduce a pain point of filling values asynchronously for later use.
  • actor types introduce a new top-level reference type (like class) that require and statically enforce that access to any of their mutable state be done asynchronously (such as by using the async/await syntax), and exist to help model thread-safe mutable data structures. The idea of global actors enables single-declaration actor isolation, such as with @MainActor.
  • A few other related proposals that fill in additional detail around those big three include the idea of continuations, a feature for bridging async/await code with existing completion-handler-based async code, and proposals dealing with the implications of the new features for closures and Objective-C interoperability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment