Skip to content

Commit 24013e7

Browse files
authored
Add sync primitives Notify and watch::channel (#2)
1 parent a381e9a commit 24013e7

File tree

9 files changed

+1964
-7
lines changed

9 files changed

+1964
-7
lines changed

Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[workspace]
22
resolver = "2"
3-
members = ["asyncs-test"]
3+
members = ["asyncs-test", "asyncs-sync"]
44

55
[workspace.package]
66
license = "Apache-2.0"
77
version = "0.2.1"
88
edition = "2021"
9+
authors = ["Kezhu Wang <[email protected]>"]
910
homepage = "https://github.com/kezhuw/asyncs"
1011
repository = "https://github.com/kezhuw/asyncs"
1112
documentation = "https://docs.rs/asyncs"
@@ -37,8 +38,9 @@ spawns-compat = ["spawns-core/compat"]
3738
[dependencies]
3839
async-select = "0.2.0"
3940
asyncs-test = { version = "0.2.1", path = "./asyncs-test", optional = true }
40-
spawns = { version = "0.2.3", optional = true }
41-
spawns-core = "1.1.0"
41+
asyncs-sync = { version = "0.2.1", path = "./asyncs-sync" }
42+
spawns = { version = "0.2.4", optional = true }
43+
spawns-core = "1.1.1"
4244

4345
[dev-dependencies]
4446
test-case = "3.3.1"

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
verify: check build test
1+
verify: check build-all test
22

33
check: check_fmt lint doc
44

@@ -12,10 +12,13 @@ lint:
1212
cargo clippy --all-features --no-deps -- -D clippy::all
1313

1414
build:
15+
cargo build --workspace --all-features
16+
17+
build-all:
1518
cargo build-all-features
1619

1720
test:
18-
cargo test --all-features
21+
cargo test --workspace --all-features
1922

2023
doc:
2124
cargo doc --all-features

asyncs-sync/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "asyncs-sync"
3+
description = "Asynchronous runtime agnostic synchronization utilities"
4+
readme.workspace = true
5+
authors.workspace = true
6+
edition.workspace = true
7+
version.workspace = true
8+
homepage.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
documentation.workspace = true
12+
13+
[dependencies]
14+
15+
[dev-dependencies]
16+
asyncs = { version = "0.2.1", path = "../", features = ["test"] }
17+
futures = "0.3.30"

asyncs-sync/src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//! Utilities to synchronize among asynchronous tasks
2+
3+
mod notify;
4+
mod parker;
5+
pub mod watch;
6+
7+
pub use notify::*;

0 commit comments

Comments
 (0)