UNPKG
mpsc-channel
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
Multi-producer, single-consumer FIFO queue communication primitives
github.com/seacrst/mpsc-channel
mpsc-channel
/
README.md
15 lines
(10 loc)
•
273 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Simple mpsc `channel` function inspired of Rust's std::sync::mpsc
## Multi-producer, single-consumer FIFO queue communication primitives
``
`ts const [tx, rx] = channel<number>(); tx.send(1); tx.send(2); rx.recv((value) => { console.log(value) }); `
``