From 3b483168b459a3679689d9c8e24bb2f2bbba56e2 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 22 Jun 2009 16:34:53 +0700 Subject: [PATCH] coros: reenable sleep() in Channel.send() to give earlier senders/waiters a priority --- eventlet/coros.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventlet/coros.py b/eventlet/coros.py index aeaf0bc..2b6fed8 100644 --- a/eventlet/coros.py +++ b/eventlet/coros.py @@ -508,8 +508,8 @@ class Channel(object): if self._waiters: api.get_hub().schedule_call_global(0, self._do_switch) else: -# if self._waiters and self._senders: -# api.sleep(0) + if self._waiters and self._senders: + api.sleep(0) self.items.append((result, exc)) # note that send() does not work well with timeouts. if your timeout fires # after this point, the item will remain in the queue