#sync #tokio #variables #condition #wait #notify

tokio-condvar

A Condition Variable for Tokio Applications

3 releases (breaking)

0.3.0 Jun 3, 2024
0.2.0 Jun 3, 2024
0.1.0 Feb 18, 2023

#566 in Concurrency

Download history 72/week @ 2024-08-18 157/week @ 2024-08-25 113/week @ 2024-09-01 134/week @ 2024-09-08 105/week @ 2024-09-15 157/week @ 2024-09-22 237/week @ 2024-09-29 123/week @ 2024-10-06 117/week @ 2024-10-13 92/week @ 2024-10-20 72/week @ 2024-10-27 93/week @ 2024-11-03 164/week @ 2024-11-10 83/week @ 2024-11-17 263/week @ 2024-11-24 421/week @ 2024-12-01

933 downloads per month
Used in 5 crates (4 directly)

MIT license

9KB
144 lines

A Condition Variable for Tokio

ci-badge license-badge crates-badge

Not Cancellation-Safe: If your future gets canceled while inside wait, no other future may get woken up.

Spurious Wakeups Possible: Like any condition variable, there can be spurious wakeups, so always re-check the condition after waking up. Note that, because this crate uses tokio's Notify internally and its semantics are slightly different than those of condition variables, spurious wake ups are even more likely.

This is not part of the Tokio project: See the discussion here on why Tokio does not have a built-in Condvar implementation (yet).

Dependencies

~2.2–8.5MB
~65K SLoC