Home | History | Annotate | Download | only in test

Lines Matching defs:thread

5 thread = test_support.import_module('thread')
16 _print_mutex = thread.allocate_lock()
28 self.done_mutex = thread.allocate_lock()
30 self.running_mutex = thread.allocate_lock()
31 self.random_mutex = thread.allocate_lock()
43 thread.start_new_thread(self.task, (self.next_ident,))
59 # Basic test for thread creation.
68 self.assertEqual(thread.stack_size(), 0, "initial stack size is not 0")
70 thread.stack_size(0)
71 self.assertEqual(thread.stack_size(), 0, "stack_size not reset to default")
76 thread.stack_size(4096)
80 except thread.error:
81 self.skipTest("platform does not support changing thread stack "
86 thread.stack_size(tss)
87 self.assertEqual(thread.stack_size(), tss, fail_msg % tss)
101 thread.stack_size(0)
105 orig = thread._count()
106 mut = thread.allocate_lock()
113 thread.start_new_thread(task, ())
116 self.assertEqual(thread._count(), orig + 1)
119 # The only reliable way to be sure that the thread ended from the
127 self.assertEqual(thread._count(), orig)
140 c = thread._count()
141 started = thread.allocate_lock()
146 thread.start_new_thread(task, ())
148 while thread._count() > c:
157 self.checkin_mutex = thread.allocate_lock()
158 self.checkout_mutex = thread.allocate_lock()
184 thread.start_new_thread(self.task2, (i,))
207 # Must release mutex before releasing done, else the main thread can
216 locktype = thread.allocate_lock
229 pid = os.fork() # fork in a thread
236 # Exiting the thread normally in the child process can leave
245 thread.start_new_thread(thread1, ())
247 "Unable to fork() in thread")