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

Re^3: singleton lock not reliable

by stevieb (Canon)
on Jun 28, 2021 at 13:52 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found