|
|
| more useful options | |
| PerlMonks |
Re: Frustration with changing lock typeby crabbdean (Pilgrim) |
| on Apr 14, 2004 at 12:20 UTC ( #345012=note: print w/ replies, xml ) | Need Help?? |
|
Yeah, there is a race condition there but in that race if another process grabs the file wouldn't it then have the lock, putting the other one into wait mode? Personally I'd avoid the LOCK_SH and just go for LOCK_EX, write what you need and release (LOCK_UN). You're talking a millisecond of time really. Dean The Funkster of Mirth Programming these days takes more than a lone avenger with a compiler. - sam RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||