sync: simplify the broadcast channel (#2467)

Replace an ad hoc read/write lock with RwLock. Use
The parking_lot RwLock when possible.
This commit is contained in:
Carl Lerche
2020-05-06 07:37:44 -07:00
committed by GitHub
parent 264ae3bdb2
commit cc8a662598
5 changed files with 99 additions and 185 deletions
+2 -4
View File
@@ -127,10 +127,8 @@ futures-test = "0.3.0"
proptest = "0.9.4"
tempfile = "3.1.0"
# loom is currently not compiling on windows.
# See: https://github.com/Xudong-Huang/generator-rs/issues/19
[target.'cfg(not(windows))'.dev-dependencies]
loom = { version = "0.3.1", features = ["futures", "checkpoint"] }
[target.'cfg(loom)'.dev-dependencies]
loom = { version = "0.3.4", features = ["futures", "checkpoint"] }
[package.metadata.docs.rs]
all-features = true