Win32::Mutex - Use Win32 mutex objects from Perl
require Win32::Mutex; $mutex = Win32::Mutex->new($initial,$name); $mutex->wait;
This module allows access to the Win32 mutex objects. The wait method and wait_all & wait_any functions are inherited from the "Win32::IPC" module.
wait
wait_all
wait_any
Constructor for a new mutex object. If $initial is true, requests immediate ownership of the mutex (default false). If $name is omitted, creates an unnamed mutex object.
$initial
$name
If $name signifies an existing mutex object, then $initial is ignored and the object is opened. If this happens, $^E will be set to 183 (ERROR_ALREADY_EXISTS).
$^E
Constructor for opening an existing mutex object.
Release ownership of a $mutex. You should have obtained ownership of the mutex through new or one of the wait functions. Returns true if successful.
$mutex
new
Wait for ownership of $mutex. See "Win32::IPC".
Win32::Mutex still supports the ActiveWare syntax, but its use is deprecated.
Use $MutObj = Win32::Mutex->new($Initial,$Name) instead.
$MutObj = Win32::Mutex->new($Initial,$Name)
Use $MutObj = Win32::Mutex->open($Name) instead.
$MutObj = Win32::Mutex->open($Name)
Use $MutObj->release instead.
$MutObj->release
Christopher J. Madsen <cjm@pobox.com>
Loosely based on the original module by ActiveWare Internet Corp., http://www.ActiveWare.com
To install Win32, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32
CPAN shell
perl -MCPAN -e shell install Win32
For more information on module installation, please visit the detailed CPAN module installation guide.