Marty O'Brien > Forks-Super-0.63 > Forks::Super::Sync::Win32Mutex

Download:
Forks-Super-0.63.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Stalled  1
View/Report Bugs
Module Version: 0.63   Source   Latest Release: Forks-Super-0.72

NAME ^

Forks::Super::Sync::Win32Mutex - Forks::Super sync object based on Win32::Mutex

VERSION ^

0.63

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 ^

Forks::Super::Sync

syntax highlighting: