Multi Producer Single Consumer channel

An MPSC inspired by Tokio and Crossbeam. The MPSC is designed to support both single and multi core processors, with only single core implemented at this time. The allocation of the channel’s buffer is inspired by the const generic parameters that Heapless provides.
This commit is contained in:
huntc
2021-06-06 18:36:16 +10:00
parent 8a172ac123
commit 1b9d5e5071
6 changed files with 1019 additions and 0 deletions

View File

@ -3,6 +3,7 @@ name = "embassy"
version = "0.1.0"
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
edition = "2018"
resolver = "2"
[features]
default = []
@ -36,3 +37,9 @@ embedded-hal = "0.2.5"
# Workaround https://github.com/japaric/cast.rs/pull/27
cast = { version = "=0.2.3", default-features = false }
[dev-dependencies]
futures-executor = { version = "0.3", features = [ "thread-pool" ] }
futures-test = "0.3"
futures-timer = "0.3"
futures-util = { version = "0.3", features = [ "channel" ] }