[Pitch] `async let` capture list
Swift Forums
[Pitch] `async let` capture list
There is currently a deficiency in Swift's async let syntax that does not allow for capturing variables to send to the right-hand side of the equals. This is especially important for Non-Sendable types that must be translated into a Sendable type to work with on the right-hand (async) side. Take the following illustrative example that registers three new tokens using a task group. Each single-use token is captured and isolated for use only inside its child task. There is no confusion about why ...
There is currently a deficiency in Swift's async let syntax that does not allow for capturing variables to send to the right-hand side of the equals. This is especially important…
0 comments
No comments yet.