Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: singleton lock not reliable

by stevieb (Canon)
on Jun 28, 2021 at 13:52 UTC ( #11134394=note: print w/replies, xml ) Need Help??

in reply to Re^2: singleton lock not reliable
in thread singleton lock not reliable

Good, better, best!

I released a new distribution, Script::Singleton that ensures only a single instance of a script can run at any time. No methods or flags to use, you simply:

use Script::Singleton 'LOCK';

That's it! LOCK is the glue/key that identifies the shared memory segment. As with my last update, send in a true value to get a warning if a second instance of a script tries to run but has to exit:

use Script::Singleton 'LOCK', 1;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-09-19 00:11 GMT
Find Nodes?
    Voting Booth?

    No recent polls found