Channel¶
Import: import system.task;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
Channel¶
Factories for channels with explicit bounded capacity or explicitly unbounded buffering.
shared_bounded¶
Creates a bounded cross-worker queue, enforcing the shared transfer constraint.
public static fun shared_bounded<T: shared>(
capacity: int
): Result<SharedChannelEndpoints<T>, ChannelError>
shared_unbounded¶
Creates an explicitly unbounded cross-worker queue of shared values.
bounded¶
Creates a bounded queue; producers suspend when its explicit capacity is reached.
unbounded¶
Creates a queue without backpressure; callers must independently bound production.