op +=
+=
Defined in
- 5.2 Precedence and associativity — Precedence and associativity
- 5.3 Overloading and user-defined operators — Overloading built-in operators — op declarations in impl
- 1.6 Operators and delimiters — + - * / % ** +% -% % +| -| | & | ^ ~ << >> && || !
- 5.1 General rules — Almost everything is an expression
- 8.7 Channels and select — tx.send(x) suspends when the buffer is full; cap
Examples
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
}Related diagnostics
chained-comparison, not-callable, not-overloadable, operator-decl, range-not-iterable, invalid-char, not-assignable