NAME
Win32::Mutex - Use Win32 mutex objects from Perl
SYNOPSIS
require Win32::Mutex;
$mutex = Win32::Mutex->new($initial,$name);
$mutex->wait;
DESCRIPTION
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.
Methods
- $mutex = Win32::Mutex->new([$initial, [$name]])
-
Constructor for a new mutex object. If
$initialis true, requests immediate ownership of the mutex (default false). If$nameis omitted, creates an unnamed mutex object.If
$namesignifies an existing mutex object, then$initialis ignored and the object is opened. - $mutex = Win32::Mutex->open($name)
-
Constructor for opening an existing mutex object.
- $mutex->release
-
Release ownership of a
$mutex. You should have obtained ownership of the mutex throughnewor one of the wait functions. Returns true if successful. - $mutex->wait([$timeout])
-
Wait for ownership of
$mutex. See "Win32::IPC".
Deprecated Functions and Methods
Win32::Mutex still supports the ActiveWare syntax, but its use is deprecated.
- Create($MutObj,$Initial,$Name)
-
Use
$MutObj = Win32::Mutex->new($Initial,$Name)instead. - Open($MutObj,$Name)
-
Use
$MutObj = Win32::Mutex->open($Name)instead. - $MutObj->Release()
-
Use
$MutObj->releaseinstead.
AUTHOR
Christopher J. Madsen <ac608@yfn.ysu.edu>
Loosely based on the original module by ActiveWare Internet Corp., http://www.ActiveWare.com