[PATCHv3] Re: Don't always sleep while waiting for exited threads

Nicolas Sebrecht nicolas.s-dev at laposte.net
Sun Dec 5 18:06:06 GMT 2010

On Sat, Dec 04, 2010 at 10:43:56PM +0100, Sebastian Spaeth wrote:
> Rather than poll our exitthread Queue in a non-blocking fashion and
> always sleep for 1 second inbetween, simply call it in a blocking
> fashion which will return immediately when a thread has exited. This
> is somewhat faster as we don't do unnecessary sleeps after a thread
> exited.
> Do note that we need to specify some timeout value here (the 60 chosen
> is pretty arbitary, but what the value exactly is, is not that
> important, it could be any positive value) in order to make the
> Queue.get() call work with SIGINT (cf
> http://bugs.python.org/issue1360).


Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list