reorder the event check so that a positive event is noticed before a closed channel
This commit is contained in:
Robey Pointer 2006-02-01 16:59:30 -08:00
parent 2262f7f188
commit 0627f09494
1 changed files with 2 additions and 2 deletions

View File

@ -1006,10 +1006,10 @@ class Channel (object):
def _wait_for_event(self):
while True:
self.event.wait(0.1)
if self.closed:
return False
if self.event.isSet():
break
if self.closed:
return False
return True
def _set_closed(self):