Home
last modified time | relevance | path

Searched refs:weaklist (Results 1 – 3 of 3) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_threading_local.py17 def target(local, weaklist): argument
20 weaklist.append(weakref.ref(weak))
32 weaklist = []
34 t = threading.Thread(target=target, args=(local, weaklist))
40 self.assertEqual(len(weaklist), n)
43 deadlist = [weak for weak in weaklist if weak() is None]
49 deadlist = [weak for weak in weaklist if weak() is None]
/external/python/cpython2/Lib/test/
Dtest_threading_local.py16 def target(local, weaklist): argument
19 weaklist.append(weakref.ref(weak))
30 weaklist = []
32 t = threading.Thread(target=target, args=(local, weaklist))
38 self.assertEqual(len(weaklist), n)
41 deadlist = [weak for weak in weaklist if weak() is None]
47 deadlist = [weak for weak in weaklist if weak() is None]
/external/python/cpython3/Python/
Dimport.c486 PyObject *weaklist = PyList_New(0); in _PyImport_Cleanup() local
487 if (weaklist == NULL) { in _PyImport_Cleanup()
492 if (weaklist != NULL) { \ in _PyImport_Cleanup()
496 if (!tup || PyList_Append(weaklist, tup) < 0) { \ in _PyImport_Cleanup()
588 if (weaklist != NULL) { in _PyImport_Cleanup()
592 for (i = PyList_GET_SIZE(weaklist) - 1; i >= 0; i--) { in _PyImport_Cleanup()
593 PyObject *tup = PyList_GET_ITEM(weaklist, i); in _PyImport_Cleanup()
609 Py_DECREF(weaklist); in _PyImport_Cleanup()