Triggers the cancellation of the fiber.
Triggers the cancellation of the fiber.
Returns a new task that will complete when the cancellation is sent (but not when it is observed or acted upon).
Note that if the background process that's evaluating the result of the underlying fiber is already complete, then there's nothing to cancel.
Returns a new task that will await for the completion of the underlying fiber, (asynchronously) blocking the current run-loop until that result is available.
Returns a new task that will await for the completion of the underlying fiber, (asynchronously) blocking the current run-loop until that result is available.
Fiber
represents the (pure) result of a Task being started concurrently and that can be either joined or cancelled.You can think of fibers as being lightweight threads, a fiber being a concurrency primitive for doing cooperative multi-tasking.
For example a
Fiber
value is the result of evaluating Task.start:Usage example: