How would you avoid the reading of a file which currentely is written by another program? Let's say something like the iTunes database file, about 10MB plain text?
When you are working on win32, you can't simply create a tmp file, write it down, and then rename it. First, the file system of win32 seems to be too slow to realize, that a file is removed and you really fast get an "file exists" error when renaming the tmp file to the original name. Second, you'll get a small time span when the file does not exist as the old content is backuped and the new content is not yet renamed. Does that fact matter?
But I agree with you, both (wysota and euthmos). If I had mandatory locks, life would be much easier. But to say, that the Trolls are too lazy to implement them is the wrong way![]()





Reply With Quote



Bookmarks