std/async/channel▲toc

Asynchronous channels.

.

type channelstd/async/channel/channel: V -> V<a>

A channel of values of type a. Values can be asynchronously emitstd/async/channel/emit: forall<a> (ch : channel<a>, value : a) -> async ()ed into a channel, and asynchronously receivestd/async/channel/receive: forall<a> (ch : channel<a>) -> <async,ndet> ad.

Emit a value asynchronously into a channel.

Receive (and remove) a value from the channel: returns immediately if a value is available and otherwise waits asynchronously until a value becomes available.

Emit a value asynchronously into a channel such that the current strand continues immediately.

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/bytesstd/core/bytes, std/core/bslicestd/core/bslice, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/maybe2std/core/maybe2, std/core/eitherstd/core/either, std/core/resultstd/core/result, std/core/tuplestd/core/tuple, std/core/lazystd/core/lazy, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/async/internalstd/async/internal, std/async/asyncstd/async/async