Home | History | Annotate | Download | only in test

Lines Matching refs:threading

1 # Very rudimentary test of threading module

9 threading = test.test_support.import_module('threading')
29 class TestThread(threading.Thread):
31 threading.Thread.__init__(self, name=name)
80 sema = threading.BoundedSemaphore(value=3)
81 mutex = threading.RLock()
107 self.assertFalse(threading.currentThread().ident is None)
109 ident.append(threading.currentThread().ident)
111 done = threading.Event()
117 del threading._active[ident[0]]
124 threading.stack_size(262144)
130 threading.stack_size(0)
137 threading.stack_size(0x100000)
143 threading.stack_size(0)
146 # Check that a "foreign" thread can use the threading module.
149 # thread to get made in the threading._active map.
150 threading.current_thread()
153 mutex = threading.Lock()
158 self.assertIn(tid, threading._active)
159 self.assertIsInstance(threading._active[tid], threading._DummyThread)
160 del threading._active[tid]
204 worker_started = threading.Event()
205 worker_saw_exception = threading.Event()
207 class Worker(threading.Thread):
258 _start_new_thread = threading._start_new_thread
259 threading._start_new_thread = fail_new_thread
261 t = threading.Thread(target=lambda: None)
264 t in threading._limbo,
267 threading._start_new_thread = _start_new_thread
309 # Avoid a deadlock when sys.settrace steps into threading._shutdown
311 import sys, threading
320 t = threading.Thread(target=killer)
326 threading.current_thread()
343 # Raising SystemExit skipped threading._shutdown
345 import threading
354 threading.Thread(target=child).start()
369 # threading.enumerate() after it has been join()ed.
370 enum = threading.enumerate
377 t = threading.Thread(target=lambda: None)
392 self.thread = threading.Thread(target=self._run,
422 import sys, os, time, threading
442 t = threading.Thread(target=joiningfunc,
443 args=(threading.current_thread(),))
462 t = threading.Thread(target=joiningfunc,
463 args=(threading.current_thread(),))
483 main_thread = threading.current_thread()
490 t = threading.Thread(target=joiningfunc,
496 w = threading.Thread(target=worker)
523 # Condition. (See threading.py:Thread.join().)
537 import os, time, threading
556 w = threading.Thread(target=worker)
566 call_count_lock = threading.Lock()
604 import os, time, threading
624 w = threading.Thread(target=worker)
652 thread = threading.Thread()
657 current_thread = threading.current_thread()
661 thread = threading.Thread()
665 thread = threading.Thread()
671 locktype = staticmethod(threading.Lock)
674 locktype = staticmethod(threading.RLock)
677 eventtype = staticmethod(threading.Event)
681 locktype = staticmethod(threading.Condition)
684 condtype = staticmethod(threading.Condition)
687 semtype = staticmethod(threading.Semaphore)
690 semtype = staticmethod(threading.BoundedSemaphore)
700 import threading
711 w = threading.Thread(target=outer)