mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 21:12:55 +00:00
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.
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
//! zenith_utils is intended to be a place to put code that is shared
|
||||
//! between other crates in this repository.
|
||||
|
||||
pub mod seqwait;
|
||||
|
||||
Reference in New Issue
Block a user