OxL Reference

8.7 Channels and select

oxl
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: 0 is a rendezvous.
  • rx.recv() -> T | Closed. A channel is closed when all Senders are destroyed.
  • select waits for the first ready branch; if several are ready, it picks with equal probability. An else branch makes select non-blocking.

See also

Source: docs/spec/oxl-standard.en.md