method Sender.send
Sends a value, waiting while the buffer is full; Closed if the receiver is gone.
Example:
fn main() io {
let (tx, rx) = chan<i64>(cap: 1)
tx.send(5)!
print("{rx.recv()!}")
}Output
5
pub(api) fn send(x: T) -> () | ClosedSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
x | T |
Returns
()
Errors
Closed@error- `Closed` when the receiver is gone.
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/task.oxl:84