Antoine Pitrou <pit...@free.fr> added the comment:

It's a pity that flush() is defined like this. Ideally, if mmap claims to 
mimick ordinary file objects, flush() should be a no-op() and there should be a 
separate sync() method.

On the other hand, your (Charles-François's) patch is already much better than 
the statu quo.
If nobody objects, I think it should be committed to 3.2. Whether or not we 
should be backport it to the stable branches is a bit more delicate, since it 
/could/ break badly written applications...

On a sidenote, the mmap object has received a *lot* less attention during the 
years than the other IO primitives (especially file objects in 3.x). It should 
probably only be used for specialized cases.

----------
components: +IO, Library (Lib)
stage: patch review -> commit review
title: mmap_object_dealloc does not call FlushViewOfFile on windows -> 
mmap_object_dealloc calls time-consuming msync(), although close doesn't
versions:  -Python 2.6, Python 2.7, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2643>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to