in reply to Locking and synchronisation within tied hashes
It becomes a bit clearer, I think, if you use the actual terminology for the locks: shared lock and exclusive lock. It's probably best to get a shared lock right when you tie, then upgrade it to an exclusive lock as soon as you need to write to the file and not downgrade to a shared lock from an exclusive one ever as that will jeopardize integrity. There is no guarantee that changes will properly become visible as long as you don't outright close the file.
Btw, am I missing something? EXISTS shouldn't need an exclusive lock..
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Locking and synchronisation within tied hashes
by rob_au (Abbot) on Sep 08, 2002 at 13:14 UTC | |
by Aristotle (Chancellor) on Sep 08, 2002 at 13:28 UTC | |
by rob_au (Abbot) on Sep 08, 2002 at 13:35 UTC | |
by Aristotle (Chancellor) on Sep 08, 2002 at 13:47 UTC |