[Concurrency] Continuations for interfacing async tasks with synchronous code

Maybe we can crash the program on the second call to CheckedContinuation.resume and on deinit if the resume is never called.

They do sound like logic errors.


Should we also include TaskAPIs (cancellation, task local) in UnsafeContinuation ?

extension UnsafeContinuation {
  var currentTask: Task.Handle { ... }
}
4 Likes