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

> > Does it have to be a class? What would be the operations apart from
> > write()?
> 
> Well, I thought that making it a file-like object could be useful:
> that way, one could pass it to pickle.dump(), logging.StreamHandler or
> any method expecting a file-like object, and would gain atomicity
> (persistency) transparently, without refactoring.

Mmmh... I might have misunderstood the proposal then. I thought this
"atomic write" API was about writing the file contents in one go and
immediately closing the file. If you want atomicity to apply to logging,
you must instead guarantee the durability of each write() call, meaning
calling fsync() on each logging call, which would be very expensive.

Am I missing something?

----------

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

Reply via email to