I would call this a Mutex and would name accordingly. Maybe something like Process::Mutex?
There are a few mutex implementations already on CPAN. I have used the Win32::Mutex module a bit in my development.
If you are going to create a generic module, I would provide different solutions depending on the OS. The above solutions using flock should work well on *nix systems while the Win32::Mutex provides an interface for Windows.
In reply to Re: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
by tokpela
in thread RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
by scorpio17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |