John Eckersberg a6c193f3eb rabbit: Avoid busy loop on epoll_wait with heartbeat+eventlet
Calling threading.Event.wait() when using eventlet results in a busy
loop calling epoll_wait, because the Python 2.x
threading.Condition.wait() implementation busy-waits by calling
sleep() with very small values (0.0005..0.05s).  Because sleep() is
monkey-patched by eventlet, this results in many very short timers
being added to the eventlet hub, and forces eventlet to constantly
epoll_wait looking for new data unecessarily.

This utilizes a new Event from eventletutils which conditionalizes the
event primitive depending on whether or not eventlet is being used.
If it is, eventlet.event.Event is used instead of threading.Event.
The eventlet.event.Event implementation does not suffer from the same
busy-wait sleep problem.  If eventlet is not used, the previous
behavior is retained.

Change-Id: I5c211092d282e724d1c87ce4d06b6c44b592e764
Depends-On: Id33c9f8c17102ba1fe24c12b053c336b6d265501
Closes-bug: #1518430
2016-11-07 12:09:38 -05:00
2015-09-24 18:11:22 +08:00
2014-06-05 22:48:44 +02:00
2015-09-17 12:16:04 +00:00

Oslo Messaging Library

Latest Version

Downloads

The Oslo messaging API supports RPC and notifications over a number of different messaging transports.

Description
OpenStack library for messaging
Readme 36 MiB
Languages
Python 99.8%
Shell 0.2%