Skip to content

Commit 99aa9bd

Browse files
authored
add RwLockExt trait (#5435)
* add RwLockExt trait to detach from Python while blocking on a RwLock * implement RwLockExt for lock_api::RwLock and Arc<RwLock> * add test of parking_lot::RwLock (via lock_api) * fix typo in test name * fix docs * check reader blocks writer case / more checks for poisoned rwlock
1 parent 2490163 commit 99aa9bd

File tree

2 files changed

+408
-0
lines changed

2 files changed

+408
-0
lines changed

newsfragments/5435.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the `pyo3::sync::RwLockExt` trait to allow detaching from the Python interpreter while blocking to acquire a rwlock. The trait is implemented for `std::sync::RwLock` as well as `parking_lot`'s / `lock_api`'s `RwLock`.

0 commit comments

Comments
 (0)