diff --git a/py/execnet/gateway.py b/py/execnet/gateway.py index 8387b1319..ac6b11041 100644 --- a/py/execnet/gateway.py +++ b/py/execnet/gateway.py @@ -275,11 +275,12 @@ class Gateway(object): ## self._exitlock.release() def exit(self): - self._outgoing.put(None) try: del _active_sendqueues[self._outgoing] except KeyError: pass + else: + self._outgoing.put(None) def join(self, joinexec=True): current = threading.currentThread()