Created
February 8, 2015 23:32
-
-
Save martijnthe/b2d778b00bf84c9b7198 to your computer and use it in GitHub Desktop.
unittest vs threading helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
def wait_until_all_threads_finish(): | |
all_threads = threading.enumerate() | |
all_threads.remove(threading.current_thread()) | |
for t in all_threads: | |
t.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment