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")
78 thread.stack_size(4096)
82 except thread.error:
84 verbose_print("platform does not support changing thread stack "
90 thread.stack_size(tss)
91 self.assertEqual(thread.stack_size(), tss, fail_msg % tss)
105 thread.stack_size(0)
109 orig = thread._count()
110 mut = thread.allocate_lock()
117 thread.start_new_thread(task, ())
120 self.assertEqual(thread._count(), orig + 1)
123 # The only reliable way to be sure that the thread ended from the
131 self.assertEqual(thread._count(), orig)
144 c = thread._count()
145 started = thread.allocate_lock()
150 thread.start_new_thread(task, ())
152 while thread._count() > c:
161 self.checkin_mutex = thread.allocate_lock()
162 self.checkout_mutex = thread.allocate_lock()
188 thread.start_new_thread(self.task2, (i,))
211 # Must release mutex before releasing done, else the main thread can
220 locktype = thread.allocate_lock
233 pid = os.fork() # fork in a thread
244 thread.start_new_thread(thread1, ())
246 "Unable to fork() in thread")