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;
|
---|
In Section
Seekers of Perl Wisdom