Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c49ff7d

Browse files
committed
reduce test num elements
1 parent e5dafb7 commit c49ff7d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Lib/test/test_free_threading/test_heapq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def heapreplace_max_func(max_heap, replace_items):
180180

181181
@unittest.skipUnless(Py_GIL_DISABLED, 'only used to test under free-threaded build')
182182
def test_lock_free_list_read(self):
183-
n, n_threads = 1_000_000, 10
183+
n, n_threads = 1_000, 10
184184
l = []
185185
barrier = Barrier(n_threads * 2)
186186

Modules/_heapqmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ heappop_internal(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t))
173173
if (!n)
174174
return lastelt;
175175
returnitem = PyList_GET_ITEM(heap, 0);
176-
// We're in the critical section now
177176
PyListObject *list = _PyList_CAST(heap);
178177
FT_ATOMIC_STORE_PTR_RELAXED(list->ob_item[0], lastelt);
179178
if (siftup_func(list, 0)) {

0 commit comments

Comments
 (0)