Commit Graph

4 Commits

Author SHA1 Message Date
Konstantin Knizhnik 9e7c45cb72 Merge with master 2021-04-22 09:45:13 +03:00
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
Eric Seppanen 92e4f4b3b6 cargo fmt 2021-04-20 17:59:56 -07:00
Eric Seppanen f387769203 add zenith_utils crate
This is a place for code that's shared between other crates in this
repository.
2021-04-20 11:11:29 -07:00