fix bug in coros.Channel: wait could timeout even though there was a send() after

This commit is contained in:
Denis Bilenko
2009-06-22 16:34:24 +07:00
parent 73b37e3af7
commit 85bc52d0e6

View File

@@ -505,6 +505,8 @@ class Channel(object):
exc = (exc, ) exc = (exc, )
if api.getcurrent() is api.get_hub().greenlet: if api.getcurrent() is api.get_hub().greenlet:
self.items.append((result, exc)) self.items.append((result, exc))
if self._waiters:
api.get_hub().schedule_call_global(0, self._do_switch)
else: else:
# if self._waiters and self._senders: # if self._waiters and self._senders:
# api.sleep(0) # api.sleep(0)