fix bug in coros.Channel: wait could timeout even though there was a send() after
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user