[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004
]
[edlug] Perl - Only run n instances of script?
Anyone got a quick way of limiting/locking a script so that it can
only be run, for example, 4 times concurrently? Any other runs of the
script would block until a "slot" was available.
Obviously if "n" was 1 then I could use flock(). I know I can use
SysV::Semaphore, but I'm sure there's something nicer! I really don't
want to have to work my way through that horrid syntax again...
Thanks, L.
-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html