[offlineimap] lots of unnecessary cpu wakeups (#81)
notifications at github.com
Mon Mar 23 15:51:15 GMT 2015
Yes, at least in python2, that is a problem. The thing is, that our main thread needs to be able to be interrupted by signals such as Ctrl-C.
This is function threadutils.py:exitnotifymonitorloop
As described in the comment, we need a timeout in that .get() call or Ctrl-C will never be catched (and we could potentially freeze forever without timeout). http://bugs.python.org/issue1360
On the other hand, a timeout will cause Python to wake up repeatedly (every 50ms if I remember correctly). I think it won't wake up if no timeout was specified.
Apparently this was fixed in python 3.2 so, we might be able to improve this in a Python3 world.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OfflineIMAP-project