coros: reenable sleep() in Channel.send() to give earlier senders/waiters a priority
This commit is contained in:
@@ -508,8 +508,8 @@ class Channel(object):
|
|||||||
if self._waiters:
|
if self._waiters:
|
||||||
api.get_hub().schedule_call_global(0, self._do_switch)
|
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)
|
||||||
self.items.append((result, exc))
|
self.items.append((result, exc))
|
||||||
# note that send() does not work well with timeouts. if your timeout fires
|
# note that send() does not work well with timeouts. if your timeout fires
|
||||||
# after this point, the item will remain in the queue
|
# after this point, the item will remain in the queue
|
||||||
|
Reference in New Issue
Block a user