Jumped from the quoted thread.
As is, Task APIs, e.g. Task.isCancelled requires the caller to be an async function, but Continuation is used only on non-async function.
AFAICT, to allow the Task -related usage in continuation block, we need to either
- Make
TaskAPI works on any non-async function, or - Provide
Task.Handleto the continuation block, - Copy all
Taskfunctionality ontoUnsafeContinuation, turn them into non-async version (since we now know whichTaskit is referring to).