Closed notgull closed 3 months ago
As of the time of writing, an RwLock is used to secure the inner data rather than a Mutex.
RwLock
Mutex
https://github.com/smol-rs/async-broadcast/blob/1fd1c29493a41bb60d4ebda56c4c82f0da478731/src/lib.rs#L296
However, it seems like most of the functions that use the inner data just use the write() method, and the usage of the read() method seems pretty rare. It might be best to replace the inner lock with a Mutex.
write()
read()
Sure thing. If you do this, I think #41 is quite up your alley too since it'll make use of your new crate. :)
As of the time of writing, an
RwLock
is used to secure the inner data rather than aMutex
.https://github.com/smol-rs/async-broadcast/blob/1fd1c29493a41bb60d4ebda56c4c82f0da478731/src/lib.rs#L296
However, it seems like most of the functions that use the inner data just use the
write()
method, and the usage of theread()
method seems pretty rare. It might be best to replace the inner lock with aMutex
.