You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like the pragmatic approach which is a perfect fit for the way I like to work!
In the book, you write that one has to be cautious that the std::sync::RwLock is sync and we need to choose an async version. Reading the docs of parking_lot I can't find any info, that it is async. Also there is some info in the tokio tutorial about when to use async mutex I don't really understand (see On using std::sync::Mutex here: https://tokio.rs/tokio/tutorial/shared-state).
Hi there and thanks for the book.
I really like the pragmatic approach which is a perfect fit for the way I like to work!
In the book, you write that one has to be cautious that the
std::sync::RwLock
is sync and we need to choose an async version. Reading the docs ofparking_lot
I can't find any info, that it is async. Also there is some info in the tokio tutorial about when to use async mutex I don't really understand (seeOn using std::sync::Mutex
here: https://tokio.rs/tokio/tutorial/shared-state).Also in this "audit" (https://www.reddit.com/r/rust/comments/f4zldz/i_audited_3_different_implementation_of_async/)
parking_lot
is shown as a sync example. So I guess the current implementation blocks the current thread whenever someone tries to acquire the lock?Any idea which implementation is "right"?
The text was updated successfully, but these errors were encountered: