NAME
Win32::IPC - Base class for Win32 synchronization objects
SYNOPSIS
use Win32::Event 1.00 qw(wait_any);
#Create objects.
wait_any(@ListOfObjects,$timeout);
DESCRIPTION
This module is loaded by the other Win32 synchronization modules. You shouldn't need to load it yourself. It supplies the wait functions to those modules.
The synchronization modules are "Win32::ChangeNotify", "Win32::Event", "Win32::Mutex", & "Win32::Semaphore".
Methods
Win32::IPC supplies one method to all synchronization objects.
- $obj->wait([$timeout])
-
Waits for
$objto become signalled.$timeoutis the maximum time to wait (in milliseconds). If$timeoutis omitted, waits forever. If$timeoutis 0, returns immediately.Returns:
+1 The object is signalled -1 The object is an abandoned mutex 0 Timed out undef An error occurred
Functions
- wait_any(@objects, [$timeout])
-
Waits for at least one of the
@objectsto become signalled.$timeoutis the maximum time to wait (in milliseconds). If$timeoutis omitted, waits forever. If$timeoutis 0, returns immediately.The return value indicates which object ended the wait:
+N $object[N-1] is signalled -N $object[N-1] is an abandoned mutex 0 Timed out undef An error occurredIf more than one object became signalled, the one with the lowest index is used.
- wait_all(@objects, [$timeout])
-
This is the same as
wait_any, but it waits for all the@objectsto become signalled. The return value indicates the last object to become signalled, and is negative if at least one of the@objectsis an abandoned mutex.
Deprecated Functions and Methods
Win32::IPC still supports the ActiveWare syntax, but its use is deprecated.
- INFINITE
-
Constant value for an infinite timeout. Omit the
$timeoutargument instead. - WaitForMultipleObjects(\@objects, $wait_all, $timeout)
-
Warning:
WaitForMultipleObjectserases@objects! Usewait_allorwait_anyinstead. - $obj->Wait($timeout)
-
Similar to
not $obj->wait($timeout).
AUTHOR
Christopher J. Madsen <ac608@yfn.ysu.edu>
Loosely based on the original module by ActiveWare Internet Corp., http://www.ActiveWare.com