Win32::IPC
The Win32::IPC module provides synchronization for multiple objects created from
the Semaphore, Mutex, Process, and ChangeNotify classes.
This wait
method of this class is inherited by objects of the preceding
modules, as well as the functions wait_all
and wait_any
. You
should not need to call Win32::IPC directly.
-
$obj->
wait
([timeout
]) This method is used on any synchronization object. It waits for the object to become signaled. It returns 1 if the object is signaled, -1 if the object is an abandoned mutex, 0 if the call times out, and
undef
on error.timeout
is the time to wait (in milliseconds). If notimeout
is specified, the method waits indefinitely.
Win32::IPC also defines the two functions wait_all
and wait_any
:
-
wait_all(
@objects
, [timeout]
) Waits for all the synchronization objects contained in
@objects
to be signaled. The optionaltimeout
parameter is the same as described forwait
. The return value will be an integer that identifies the last object to be signaled (then
th object in the list, starting from 1). A negative integer (-n
) indicates that then
th object was an abandoned mutex. A return of 0 means that the function timed out; andundef
is returned on error.-
wait_any(
@objects
, [timeout]
) Waits for at least one of the objects contained in
@objects
to be signaled. Return values are the same as forwait_all
, above, indicating which object signaled.
Get Perl in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.