Win32::Semaphore - Use Win32 semaphore objects from Perl
$sem = Win32::Semaphore->new($initial,$maximum,$name); $sem->wait;
This module allows access to Win32 semaphore objects. The
wait method and
wait_any functions are inherited from the "Win32::IPC" module.
Constructor for a new semaphore object.
$initial is the initial count, and
$maximum is the maximum count for the semaphore. If
$name is omitted, creates an unnamed semaphore object.
$name signifies an existing semaphore object, then
$maximum are ignored and the object is opened.
Constructor for opening an existing semaphore object.
Increment the count of
$increment (default 1). If
$increment plus the semaphore's current count is more than its maximum count, the count is not changed. Returns true if the increment is successful.
The semaphore's count (before incrementing) is stored in the second argument (if any).
It is not necessary to wait on a semaphore before calling
release, but you'd better know what you're doing.
$semaphore's count to be nonzero, then decrement it by 1. See "Win32::IPC".
Win32::Semaphore still supports the ActiveWare syntax, but its use is deprecated.
$SemObject = Win32::Semaphore->new($Initial,$Max,$Name) instead.
$SemObject = Win32::Semaphore->open($Name) instead.
Christopher J. Madsen <firstname.lastname@example.org>
Loosely based on the original module by ActiveWare Internet Corp., http://www.ActiveWare.com