Author vstinner
Recipients Trundle, giampaolo.rodola, pitrou, tarek, vstinner
Date 2010-05-27.10:51:43
SpamBayes Score 0.0880997
Marked as misclassified No
Message-id <1274957506.17.0.927067769564.issue8828@psf.upfronthosting.co.za>
In-reply-to
Content
@pitrou: Yes, as I wrote: it's not possible to write an atomic function for all OS. The documentation must give a list of the OS on which the function is atomic. Would you prefer to not define the function instead of writing a pseudo-atomic function?

--

Java bug opened in 1996, closed with "Will Not Fix", last comment ("i am facing similar issue...") in 2008:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4017593

"How to do atomic writes in a file" in a MSDN blog:
http://blogs.msdn.com/b/adioltean/archive/2005/12/28/507866.aspx

Extract: "Sometimes shell operations like Delete, Rename can fail for various reasons. For example, it might just happen that an antivirus or content indexing application randomly scans the whole file system once in a while. So, potentially, the file Foo.Tmp.txt will be opened for a short period which will cause ... failed delete. And, not only that, but also Rename can fail if the old file already exists, and someone has an open handle on it."

To avoid that "antivirus or content indexing application" open the file, we may need to use a lock on the files.
History
Date User Action Args
2010-05-27 10:51:46vstinnersetrecipients: + vstinner, pitrou, giampaolo.rodola, tarek, Trundle
2010-05-27 10:51:46vstinnersetmessageid: <1274957506.17.0.927067769564.issue8828@psf.upfronthosting.co.za>
2010-05-27 10:51:44vstinnerlinkissue8828 messages
2010-05-27 10:51:43vstinnercreate