async-channel

Async multi-producer multi-consumer channel

Latest version: 2.3.1 registry icon
Maintenance score
72
Safety score
100
Popularity score
79
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
2.3.1 0 0 0 0 0
2.3.0 0 0 0 0 0
2.2.1 0 0 0 0 0
2.2.0 0 0 0 0 0
2.1.1 0 0 0 0 0
2.1.0 0 0 0 0 0
2.0.0 0 0 0 0 0
1.9.0 0 0 0 0 0
1.8.0 0 0 0 0 0
1.7.1 0 0 0 0 0
1.7.0 0 0 0 0 0
1.6.1 0 0 0 0 0
1.6.0 0 0 0 0 0
1.5.1 0 0 0 0 0
1.5.0 0 0 0 0 0
1.4.2 0 0 0 0 0
1.4.1 0 0 0 0 0
1.4.0 0 0 0 0 0
1.3.0 0 0 0 0 0
1.2.0 0 0 0 0 0
1.1.1 0 0 0 0 0
1.1.0 0 0 0 0 0
1.0.0 0 0 0 0 0
0.1.0 0 0 0 0 0

Stability
Latest release:

2.3.1 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

Apache-2.0   -   Apache License 2.0

Not a wildcard

Not proprietary

OSI Compliant


MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



async-channel

Build License Cargo Documentation

An async multi-producer multi-consumer channel, where each message can be received by only one of all existing consumers.

There are two kinds of channels:

  1. Bounded channel with limited capacity.
  2. Unbounded channel with unlimited capacity.

A channel has the Sender and Receiver side. Both sides are cloneable and can be shared among multiple threads.

When all Senders or all Receivers are dropped, the channel becomes closed. When a channel is closed, no more messages can be sent, but remaining messages can still be received.

The channel can also be closed manually by calling Sender::close() or Receiver::close().

Examples

let (s, r) = async_channel::unbounded();

assert_eq!(s.send("Hello").await, Ok(()));
assert_eq!(r.recv().await, Ok("Hello"));

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.