Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Flock a file when just reading it?

by robartes (Priest)
on Jun 16, 2005 at 08:52 UTC ( #467207=note: print w/ replies, xml ) Need Help??


in reply to Flock a file when just reading it?

If you are only reading in the file *and no one else is writing in it at the same time*, you do not have to lock it.

In fact, you would only need to lock anything for read when 1) your read is non-atomic and 2) the data you're reading might be changed by a writer during your read. I'd say that in your case neither of these conditions is true (although you can't be sure of 1) ).

CU
Robartes-


Comment on Re: Flock a file when just reading it?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-07-06 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls