File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Original file line number Diff line number Diff line change 1
1
import sys
2
2
from test import list_tests
3
- from test .support import cpython_only , Py_GIL_DISABLED
3
+ from test .support import cpython_only
4
4
import pickle
5
5
import unittest
6
6
Original file line number Diff line number Diff line change 12
12
import sysconfig
13
13
import test .support
14
14
from test import support
15
- from test .support import os_helper
15
+ from test .support import os_helper , Py_GIL_DISABLED
16
16
from test .support .script_helper import assert_python_ok , assert_python_failure
17
17
from test .support import threading_helper
18
18
from test .support import import_helper
@@ -1575,9 +1575,12 @@ def get_gen(): yield 1
1575
1575
check (re .finditer ('' ,'' ), size ('2P' ))
1576
1576
# list
1577
1577
check (list ([]), vsize ('Pn' ))
1578
- check (list ([1 ]), vsize ('Pn' ) + 2 * self .P )
1579
- check (list ([1 , 2 ]), vsize ('Pn' ) + 2 * self .P )
1580
- check (list ([1 , 2 , 3 ]), vsize ('Pn' ) + 4 * self .P )
1578
+ if Py_GIL_DISABLED :
1579
+ pass
1580
+ else :
1581
+ check (list ([1 ]), vsize ('Pn' ) + 2 * self .P )
1582
+ check (list ([1 , 2 ]), vsize ('Pn' ) + 2 * self .P )
1583
+ check (list ([1 , 2 , 3 ]), vsize ('Pn' ) + 4 * self .P )
1581
1584
# sortwrapper (list)
1582
1585
# XXX
1583
1586
# cmpwrapper (list)
Original file line number Diff line number Diff line change @@ -773,7 +773,6 @@ list_clear_impl(PyListObject *a, bool is_resize)
773
773
while (-- i >= 0 ) {
774
774
Py_XDECREF (items [i ]);
775
775
}
776
- // TODO: Use QSBR technique, if the list is shared between threads,
777
776
#ifdef Py_GIL_DISABLED
778
777
bool use_qsbr = is_resize && _PyObject_GC_IS_SHARED (a );
779
778
#else
You can’t perform that action at this time.
0 commit comments