Module Scope.Token

type !'a t

Represents an ongoing process to add a task to the scope.

val use : 'a t @ unique -> (f: (Await_kernel.Terminator.t @ local -> ('a Task_handle.t @ local unique -> Base.unit) @ local once) @ local once -> Base.unit) @ once

use token ~f consumes the token and turns it into a task by calling f terminator task_handle.

val drop : 'a t @ unique -> Base.unit

drop token consumes the token without spawning a task.