diff options
author | Adi Roiban <adi@roiban.ro> | 2012-06-28 21:11:13 +0300 |
---|---|---|
committer | Adi Roiban <adi@roiban.ro> | 2012-06-28 21:11:13 +0300 |
commit | 567da5472daa16b6d03643df7034be6b274d2253 (patch) | |
tree | 7770ac22b2bf2a97622ff7d56d742f80038d3c11 | |
parent | a6894e0d23afc3afeb921620a2b61ebf6bbea5c8 (diff) | |
download | nose-567da5472daa16b6d03643df7034be6b274d2253.tar.gz |
Call reactor.stop from twisted thread.
-rw-r--r-- | nose/twistedtools.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nose/twistedtools.py b/nose/twistedtools.py index 3720610..2f2c14a 100644 --- a/nose/twistedtools.py +++ b/nose/twistedtools.py @@ -70,7 +70,11 @@ def stop_reactor(): you mix tests using these tools and tests using twisted.trial. """ global _twisted_thread - reactor.stop() + + def stop_reactor(): + '''Helper for calling stop from withing the thread.''' + reactor.stop() + reactor_thread.join() for p in reactor.getDelayedCalls(): if p.active(): |