Active waiting?

Nicolas Sebrecht nicolas.s-dev at laposte.net
Mon Mar 23 16:15:52 GMT 2015


On Mon, Mar 23, 2015 at 12:53:22PM +0100, Sebastian Spaeth wrote:
>    Nope, it waits for a signal, and python's implementation wakes up every
>    few milliseconds. I would not see a way to work around that without
>    risking infinite freezes.

Well, if signal is the root cause (I still didn't have the proof of
this) we could still leave the whole threading/signal things out to
something else, perhaps gevent or eventlet if coroutines can match our
needs. I guess we would then fallback to the KeyboardInterrupt exception
mechanism and remove all other signal features.

I still have to dig into this more deeply.

Looks like other python programs already did move like that for this
reason: https://bugzilla.redhat.com/show_bug.cgi?id=239893#c9

http://www.gevent.org/
http://eventlet.net/

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list