@ -252,4 +252,4 @@ if __name__ == '__main__':
for i in range(n_thread):
_thread.start_new_thread(thread_entry, ())
while count.value < n_thread:
time.sleep(0.1)
time.sleep(1)
@ -15,5 +15,5 @@ _thread.start_new_thread(thread_entry, ())
# wait for threads to finish
time.sleep(0.2)
print('done')
@ -20,5 +20,5 @@ for i in range(4):
@ -24,5 +24,5 @@ for i in range(n_thread):
while n_finished < n_thread:
print('done', n_thread)
@ -19,5 +19,5 @@ _thread.start_new_thread(thread_entry, (10,))
_thread.start_new_thread(thread_entry, (20,))
@ -15,5 +15,5 @@ def thread_entry(a0, a1, a2, a3):
_thread.start_new_thread(thread_entry, (10, 20), {'a2': 0, 'a3': 1})
# wait for thread to finish