Commits

Floris Bruynooghe committed 0a8d3e7

Fix another small race condition in Notifier.notify()

Comments (0)

Files changed (1)

 new file mode 100644
 --- /dev/null
 +++ b/eventlet/xthread.py
-@@ -0,0 +1,662 @@
+@@ -0,0 +1,665 @@
 +"""Cross-thread syncronisation primitives for eventlet
 +
 +This contains various syncronisation primitives for use with eventlet.
 +        thread or eventlet itself and will wake up the hub of another
 +        thread if an eventlet from it is notified.
 +        """
-+        if self._waiters:
++        try:
 +            waiter = self._waiters.pop()
++        except KeyError:
++            pass
++        else:
 +            waiter.release()
 +
 +    def notify_all(self):