def select.go

bend-kit-concurrency@0.2.0.0 · concurrency.bend:306

import bend-kit-concurrency@0.2.0.0/concurrency.bend as Concurrency
import Base

306def select.go(-A: Type, chans: List<Chan(A)>, +out: Chan(U32 & A), +done: Chan(Unit)) ->
307  IO(Chan(U32 & A)):
308  do IO<Chan(U32 & A)>:
309    n : Nat <- select.start(A, chans, 0, out, done)
310    IO.spawn(Unit, select.close(A, n, out, done))
311    return out

Uses (12)

Used by (1)