mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
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.
13 lines
281 B
TOML
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"] }
|