Commit 9ee55a3
Implement locked iteration for PyList (#4789)
* implement locked iteration for PyList
* fix limited API and PyPy support
* fix formatting of safety docstrings
* only define fold and rfold on not(feature = "nightly")
* add missing try_fold implementation on nightly
* Use split borrows for locked iteration for PyList
Inline ListIterImpl implementations by using split borrows and
destructuring let Self { .. } = self destructuring inside
BoundListIterator impls.
Signed-off-by: Manos Pitsidianakis <[email protected]>
* use a function to do the split borrow
* add changelog entries
* fix clippy on limited API and PyPy
* use a macro for the split borrow
* add a test that mutates the list during a fold
* enable next_unchecked on PyPy
* fix incorrect docstring for locked_for_each
* simplify borrows by adding BoundListIterator::with_critical_section
* fix build on GIL-enabled and limited API builds
* fix docs build on MSRV
---------
Signed-off-by: Manos Pitsidianakis <[email protected]>
Co-authored-by: Manos Pitsidianakis <[email protected]>1 parent 4b04bb3 commit 9ee55a3
File tree
3 files changed
+454
-33
lines changed- newsfragments
- src/types
3 files changed
+454
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments