GitHub

fiber_handle

API reference for fiber_handle.

FiberHandle[A, E]: at most one fiber at a time, inside one scope.

Running or setting a new fiber interrupts the current one (only_if_missing=True keeps it and interrupts the newcomer instead). Replaced fibers stay owned until they finish interrupting, so closing the scope waits for their cleanup too. join fails with the first failure; interrupts only count with propagate_interruption=True, and never those the handle sends itself (replacing, clear, closing).

runtime(*tags) returns a runner that forks root fibers into the handle from plain code, as Effect's FiberHandle.runtime.

Classes