Active waiting?

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed Mar 25 20:40:14 GMT 2015


On Mon, Mar 23, 2015 at 09:49:58PM +0100, Nicolas Sebrecht wrote:

> To get quicker react on events, you could try something like that:
> 
>   nloop = timeout / 30
>   while nloop > 0:
>       if event.isSet():
>           break
>       time.sleep(30)
>       nloop -= 1
> 
> which enables to react each 30 seconds at most for events.

Did you test the above snippet by any chance? I consider including it in
the mainline.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list