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

Add an owned variant of RwLockReadGuard and RwLockWriteGuard

Open haselkern opened this issue 4 years ago • 0 comments

When locking an Arc<Mutex<...>> I can call lock_arc, which returns an extremely handy owned MutexGuardArc.

I would expect an Arc<RwLock<...>> to provide read_arc and write_arc to return owned guards as well, unfortunately these methods do not exist. They should be possible to implement, since the tokio project does provide such methods.

haselkern avatar Oct 02 '21 14:10 haselkern