Thread Problem mit FileHandle
(24 answers)
Opened by
rosti
at 2011-04-05 22:27
User since 2006-07-10
2611
Artikel
BenutzerIn
aus der Storable Doku:
QuoteADVISORY LOCKING
The "lock_store" and "lock_nstore" routine are equivalent to "store" and "nstore", except that they get an exclusive lock on the file before writing. Likewise, "lock_retrieve" does the same as "retrieve", but also gets a shared lock on the file before reading.
As with any advisory locking scheme, the protection only works if you systematically use "lock_store" and "lock_retrieve". If one side of your application uses "store" whilst the other uses "lock_retrieve", you will get no protection at all.
The internal advisory locking is implemented using Perl's flock() routine. If your system does not support any form of flock(), or if you share your files across NFS, you might wish to use other forms of locking by using modules such as LockFile::Simple which lock a file using a filesystem entry, instead of locking the file descriptor.
Last edited: 2011-04-06 18:36:44 +0200 (CEST)
View full thread Problem mit FileHandle
|