if (defined $timeout) {
$z = $self->{mutex}[$n]->wait(1000 * $timeout);
} else {
$z = $self->{mutex}[$n]->wait;
}
if ($z) {
$self->{acquired}[$n] = 1;
}
return $z;
NAME
Forks::Super::Sync::Win32::Mutex
SYNOPSIS
$lock = Forks::Super::Sync->new(implementation => 'Win32Mutex', ...);
$lock = Forks::Super::Sync->new(implementation => 'Win32::Mutex', ...);
$pid=fork();
$lock->releaseAfterFork();
if ($pid == 0) { # child code
$lock->acquire(...);
$lock->release(...);
} else {
$lock->acquire(...);
$lock->release(...);
}
DESCRIPTION
IPC synchronization object implemented with Win32::Mutex.
Advantages: fast, doesn't create files or use filehandles
Disadvantages: Windows only. Gets complicated when a process dies without releasing its locks.
SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 123:
Unknown directive: =deprecated