> Le dim. 22 janv. 2017 à 21:04, Ethan Furman <et...@stoneleaf.us> a écrit :
>> Question:  I need to add a threaded test to the enum test module [1] -- is
>> there anything extra I
>> need to worry about besides the test itself?  Setting or resetting or
>> using a tool library, etc?
>>
>> threads = []
>> for i in range(8):
>>     threads.append(threading.Thread(target=cycle_enum))
>> for t in threads:
>>     t.start()
>> for t in threads:
>>     t.join()

On 22 January 2017 at 20:17, Victor Stinner <victor.stin...@gmail.com> wrote:
> There is @support.reap_thread which can help.

As I understand, @reap_threads basically does a join() on each
background thread, with a total timeout of 1 s. So since your test is
unlikely to fail between starting threads and joining them, I don’t
think you need to use @reap_threads.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to