Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment:
I think this relates #6896.
Maybe a two second resolution should be tried?
----------
keywords: +patch
nosy: +sdaoden
Added file: http://bugs.python.org/file21884/11999.1.diff
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11999>
_______________________________________
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -514,13 +514,11 @@
else:
return
- # We record the current time - 1sec so that, if _refresh() is called
- # again in the same second, we will always re-read the mailbox
- # just in case it's been modified. (os.path.mtime() only has
- # 1sec resolution.) This results in a few unnecessary re-reads
- # when _refresh() is called multiple times in the same second,
- # but once the clock ticks over, we will only re-read as needed.
- now = time.time() - 1
+ # Try to be fancy by using a date in the past for our _last_read mtime
+ # checks (see issues #6896, #11999)
+ # Using a two second resolution should be enough to overcome all
+ # fuzziness which may be introduced along the different filesystems.
+ now = time.time() - 2
self._toc = {}
def update_dir (subdir):
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com