8.7 Channels and select
let (tx, rx) = chan<Job>(cap: JOB_QUEUE)
select {
recv job from rx => process(job)
send r to results => sent += 1
after IDLE_TIMEOUT => log.info("idle")
else => tick() // non-blocking variant
}tx.send(x)suspends when the buffer is full;cap: 0is a rendezvous.rx.recv() -> T | Closed. A channel is closed when allSenders are destroyed.selectwaits for the first ready branch; if several are ready, it picks with equal probability. Anelsebranch makesselectnon-blocking.
See also
Source: docs/spec/oxl-standard.en.md