in reply to locking over the network
If the order of reads and writes is independent and you simply want to ensure you have a consistent read, you could try having the writer write to a temp file, unlink the real file, and then rename that temp file to the real name.
Would the unlink and rename be sufficiently atomic for your purpose?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: locking over the network
by rovf (Priest) on Jan 31, 2011 at 17:15 UTC | |
by BrowserUk (Patriarch) on Jan 31, 2011 at 18:24 UTC | |
by tye (Sage) on Jan 31, 2011 at 20:51 UTC | |
by rovf (Priest) on Feb 01, 2011 at 10:11 UTC | |
by Corion (Patriarch) on Feb 01, 2011 at 14:34 UTC | |
by tye (Sage) on Feb 01, 2011 at 18:34 UTC | |
by rovf (Priest) on Feb 01, 2011 at 16:00 UTC | |
| |
by SuicideJunkie (Vicar) on Feb 01, 2011 at 14:28 UTC | |
by tye (Sage) on Feb 01, 2011 at 14:39 UTC | |
by rovf (Priest) on Feb 01, 2011 at 15:52 UTC | |
| |
by rowdog (Curate) on Feb 02, 2011 at 02:17 UTC |