Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: singleton lock not reliable

by choroba (Archbishop)
on Jun 23, 2021 at 18:38 UTC ( #11134207=note: print w/replies, xml ) Need Help??


in reply to singleton lock not reliable

Of course you can see two instances in ps output. One instance holds the lock and sleeps, the other one has just started and hasn't yet tried to obtain the lock.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: singleton lock not reliable
by ikegami (Patriarch) on Jun 24, 2021 at 04:28 UTC

    In other words, the lock doesn't prevent multiple instances of the script from running. It just prevents all but one of them from reaching the sleep.

    Seeking work! You can reach me at ikegami@adaelis.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2022-08-18 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?