Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: The internals of flock()

by termix (Beadle)
on Dec 26, 2001 at 03:06 UTC ( #134320=note: print w/replies, xml ) Need Help??


in reply to Re: The internals of flock()
in thread The internals of flock()

True and good advise.

The programmer can also use time outs and alarms to walk out of a blocked IO call. Examples of this exist in the perlipc documentation (man perlipc ; perldoc perlipc). (might only work safely on UNIX though).

This will solve your retry problem too. On failing a blocking IO operation, the cautious always pause before trying again. Also be careful of the advisory nature of the flock. A program is not forced to wait unless they lock and unlock voluntarily at the correct place in their operations.
-- termix

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://134320]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2023-06-01 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?