Add an owned variant of RwLockReadGuard and RwLockWriteGuard
Open
enhancement
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 339
- PR merge metrics
- No merged PRs in 30d
Description
When locking an `Arc>` I can call [`lock_arc`](https://docs.rs/async-std/1.10.0/async_std/sync/struct.Mutex.html#method.lock_arc), which returns an extremely handy owned `MutexGuardArc`.
I would expect an `Arc>` 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](https://docs.rs/tokio/1.12.0/tokio/sync/struct.RwLock.html#method.read_owned).
Contributor guide
Assessment
This issue has not been assessed yet.