From a429e17e8e5cc3f5d442d374fb4843badfd4dd48 Mon Sep 17 00:00:00 2001 From: Olle Lundberg Date: Thu, 14 Aug 2014 12:00:46 +0200 Subject: Join the threads with a low timeout. Instead of using private methods on the threading class, let the thread join, but with a low timeout. --- test.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 2b3d4ed4..92a3e6d0 100755 --- a/test.py +++ b/test.py @@ -149,10 +149,7 @@ def main(): # TODO: make that not a problem, jeez for thread in threading.enumerate(): if thread is not threading.currentThread(): - if PY2: - thread._Thread__stop() - else: - thread._stop() + thread.join(timeout=1) # Exit correctly if not result.wasSuccessful(): sys.exit(1) -- cgit v1.2.3