Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Auto flock

by davido (Cardinal)
on Nov 20, 2012 at 17:46 UTC ( [id://1004766]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Auto flock
in thread Auto flock

Your assessment of how to fix some of the concerns I raised is good. One could certainly build logic into the tool to deal with read versus write. And the failed flock issue could also be handled internally with better logic. There are other issues as well though. One is that code isn't usually written with the notion that 'open' could block, which is exactly what would happen with 'autoflock' if a file is already locked. That flock normally blocks to wait for a lock is expected behavior of that function, but not expected of open. That could break existing code.

So those are the issues we know about. My fear is the edge cases we haven't considered and aren't aware of. If we were talking about overriding 'chop', I'd say no big deal. open is a little more complicated, and the stakes are higher.

Yes, space_monk's suggestion is probably the one.


Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found