Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: singleton lock not reliable

by choroba (Cardinal)
on Jun 23, 2021 at 18:38 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found