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.c403 PyObject *weaklist = NULL; in PyImport_Cleanup() local
445 weaklist = PyList_New(0); in PyImport_Cleanup()
446 if (weaklist == NULL) in PyImport_Cleanup()
450 if (weaklist != NULL) { \ in PyImport_Cleanup()
454 if (!tup || PyList_Append(weaklist, tup) < 0) { \ in PyImport_Cleanup()
542 if (weaklist != NULL) { in PyImport_Cleanup()
544 n = PyList_GET_SIZE(weaklist); in PyImport_Cleanup()
546 PyObject *tup = PyList_GET_ITEM(weaklist, i); in PyImport_Cleanup()
561 Py_DECREF(weaklist); in PyImport_Cleanup()