Files
neon/zenith_utils/Cargo.toml
Eric Seppanen 8060e17b50 add SeqWait
SeqWait adds a way to .await the arrival of some sequence number.
It provides wait_for(num) which is an async fn, and advance(num) which
is synchronous.

This should be useful in solving the page cache deadlocks, and may be
useful in other areas too.

This implementation still uses a Mutex internally, but only for a brief
critical section. If we find this code broadly useful and start to care
more about executor stalls due to unfair thread scheduling, there might
be ways to make it lock-free.
2021-04-21 18:02:13 -07:00

13 lines
281 B
TOML

[package]
name = "zenith_utils"
version = "0.1.0"
authors = ["Eric Seppanen <eric@zenith.tech>"]
edition = "2018"
[dependencies]
tokio = { version = "1.5", features = ["sync", "time" ] }
thiserror = "1"
[dev-dependencies]
tokio = { version = "1.5", features = ["macros", "rt"] }