Skip to content
Discussion options

You must be logged in to vote

1. I assume this onTermination closure is invoked upon termination of the continuation. I also read in the documentation that the square bracket syntax is "capturing" and reassigning those dependencies to UncheckedSendables. What's confusing me is why is there an additional _ in scoped dependencies before the closure block?

This is because onTermination takes a Continuation as a parameter. We're not using it, though, so we ignore it with a _.

2. Why are we reassigning those dependencies to UncheckedSendables?

This example maybe goes above-and-beyond to prepare for Swift 6 (to the point of making the demo too complex, perhaps), but we use UncheckedSendable because Speech and other Appl…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@michael-prosper
Comment options

@stephencelis
Comment options

@michael-prosper
Comment options

Answer selected by michael-prosper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants