From 85bc52d0e6acfe27fb4ad6d8ad4bc09d2387f3d8 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 22 Jun 2009 16:34:24 +0700 Subject: [PATCH] fix bug in coros.Channel: wait could timeout even though there was a send() after --- eventlet/coros.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eventlet/coros.py b/eventlet/coros.py index 7c0d82d..aeaf0bc 100644 --- a/eventlet/coros.py +++ b/eventlet/coros.py @@ -505,6 +505,8 @@ class Channel(object): exc = (exc, ) if api.getcurrent() is api.get_hub().greenlet: self.items.append((result, exc)) + if self._waiters: + api.get_hub().schedule_call_global(0, self._do_switch) else: # if self._waiters and self._senders: # api.sleep(0)