Lines Matching defs:Local
16 def target(local, weaklist):
18 local.weak = weak
29 local = self._local()
32 t = threading.Thread(target=target, args=(local, weaklist))
40 # XXX _threading_local keeps the local of the last stopped thread alive.
44 # Assignment to the same thread local frees it sometimes (!)
45 local.someothervar = None
52 # of a threading.local derived class, the per-thread dictionary
56 class Local(self._local):
59 local = Local()
62 local.x = i
64 self.assertEqual(local.x, i)
72 class Local(self._local):
80 # 1) Involve Local in a cycle
81 cycle = [Local()]
93 passed[0] = all(not hasattr(local, 'foo') for local in locals)
102 locals = [Local() for i in range(10)]
110 from thread import _local as local
111 from _threading_local import local as py_local
113 for cls in (local, py_local):
194 x.local = self._local()
195 x.local.x = x
202 _local = _threading_local.local
217 local_orig = _threading_local.local
219 _threading_local.local = _local
221 _threading_local.local = local_orig