doc:appunti:prog:perl_flock
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| doc:appunti:prog:perl_flock [2011/02/26 14:49] – niccolo | doc:appunti:prog:perl_flock [2011/02/26 14:56] (current) – niccolo | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| # Try to lock the file, waiting 5 seconds max. | # Try to lock the file, waiting 5 seconds max. | ||
| + | $i = 0; | ||
| while (! flock(FILE, LOCK_EX | LOCK_NB)) { | while (! flock(FILE, LOCK_EX | LOCK_NB)) { | ||
| if (++$i > 5) { | if (++$i > 5) { | ||
doc/appunti/prog/perl_flock.1298728169.txt.gz · Last modified: by niccolo
