Commit 39a98e2a authored by Denis Bilenko's avatar Denis Bilenko

Greenlet.join(): fix timeout bug: it used to raise Timeout instead of simply returning

parent f83b3e84
...@@ -357,6 +357,10 @@ class Greenlet(greenlet): ...@@ -357,6 +357,10 @@ class Greenlet(greenlet):
assert result is self, 'Invalid switch into Greenlet.join(): %r' % (result, ) assert result is self, 'Invalid switch into Greenlet.join(): %r' % (result, )
finally: finally:
t.cancel() t.cancel()
except Timeout, ex:
self.unlink(switch)
if ex is not t:
raise
except: except:
self.unlink(switch) self.unlink(switch)
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment