Skip to content

Commit a465573

Browse files
committed
Fix cast and minor edits to test
1 parent dd05e67 commit a465573

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Lib/test/test_free_threading/test_collections.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def copy_loop():
2424
for _ in range(1000):
2525
copy(d)
2626

27-
workers = [mutate, mutate, copy_loop, copy_loop]
28-
threading_helper.run_concurrently(workers)
27+
threading_helper.run_concurrently([mutate, copy_loop])
2928

3029

3130
if __name__ == "__main__":

Modules/_collectionsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,7 @@ dequeiter_next(PyObject *op)
19911991
// it mid-iteration. The one-object critical section avoids this
19921992
// because it keeps the deque locked across calls when it's already
19931993
// held, due to a fast-path optimization.
1994-
if (_PyObject_IsUniquelyReferenced(it)) {
1994+
if (_PyObject_IsUniquelyReferenced((PyObject *)it)) {
19951995
Py_BEGIN_CRITICAL_SECTION(deque);
19961996
result = dequeiter_next_lock_held(it, deque);
19971997
Py_END_CRITICAL_SECTION();

0 commit comments

Comments
 (0)