async-broadcast icon indicating copy to clipboard operation
async-broadcast copied to clipboard

Replace the RwLock securing the inner data with a Mutex

Open notgull opened this issue 1 year ago • 1 comments

As of the time of writing, an RwLock is used to secure the inner data rather than a 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.

notgull avatar May 16 '23 02:05 notgull

Sure thing. If you do this, I think #41 is quite up your alley too since it'll make use of your new crate. :)

zeenix avatar May 16 '23 11:05 zeenix