Skip to content

Commit 08776e4

Browse files
committed
Add a section about adoption in the Concurrency library.
1 parent b42ae83 commit 08776e4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

proposals/NNNN-transferring-parameters-and-results.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,20 @@ always implies no-implicit-copying, so there is no way to change the default
321321
ownership convention of a `transferring` parameter without also opting into
322322
no-implicit-copying semantics.
323323

324+
### Adoption in the Concurrency library
325+
326+
There are several APIs in the concurrency library that transfer a parameter
327+
across isolation boundaries and don't need the full guarnatees of `Sendable`.
328+
These APIs will instead adopt `transferring` parameters:
329+
330+
* `CheckedContinuation.resume(returning:)`
331+
* `Async{Throwing}Stream.Continuation.yield(_:)`
332+
* `Async{Throwing}Stream.Continuation.yield(with:)`
333+
* The `Task` creation APIs
334+
335+
Note that this list does not include `UnsafeContinuation.resume(returning:)`,
336+
because `UnsafeContinuation` deliberately opts out of correctness checking.
337+
324338
## Source compatibility
325339

326340
In the Swift 5 language mode, `transferring` diagnostics are suppressed under

0 commit comments

Comments
 (0)