There's also async-lock, which is very similar except guards are not tied to a lifetime. Useful when you need to move a guard into a newly spawned task! https://docs.rs/async-lock
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Correction for the contended mutex: the number for the futures version was wrong. Copy-paste error, sorry about that! You can run benchmarks with cargo bench: https://github.com/stjepang/async-mutex …pic.twitter.com/bXlvtVCdgh
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You absolutely should!
End of conversation
New conversation -
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Very cool. Looks similar in principle to C++20’s atomic_wait and atomic_notify_one functions.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.