python, offlineimap and wakeups (outch)

Ethan Glasser-Camp glasse at
Fri Mar 11 16:44:56 GMT 2011

On 03/10/2011 02:20 AM, Sebastian Spaeth wrote:
> Yep, the issue is not join per se, but calling it with a timeout. (or in
> our case, I introduced the timeout to Queue.get() in our
> threadexitmonitorloop (or whatever it is called). Without a timeout, we
> won't wake up, but we will also not react to ctrl-c (not sure about
> SIGTTERM). With a timeout, we react to ctrl-c, but wake up every 50ms.
> (modify your sample code to have a timeout in the .join() and recheck
> with powertop).

Wow, that totally sucks. The Python documentation even says: "It is not 
possible to interrupt an acquire on a lock."

I'm hesitant to go your route of sending SIGKILL to a process to 
"interrupt" it. The whole point of Ctrl-C is to send a "polite" shutdown 

The good news is that it looks like this is fixed in Python 3.2:

So all we need to do is make offlineimap compatible with Python 3 and we 
should be good to go :)


More information about the OfflineIMAP-project mailing list