Win32.Semaphore man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

Semaphore(3)	      User Contributed Perl Documentation	  Semaphore(3)

NAME
       Win32::Semaphore - Use Win32 semaphore objects from Perl

SYNOPSIS require Win32::Semaphore;
	       $sem = Win32::Semaphore->new($initial,$maximum,$name);
	       $sem->wait;

DESCRIPTION
       This module allows access to Win32 semaphore objects.  The "wait"
       method and "wait_all" & "wait_any" functions are inherited from the
       "Win32::IPC" module.

   Methods
       $semaphore = Win32::Semaphore->new($initial, $maximum, [$name])
	   Constructor for a new semaphore object.  $initial is the initial
	   count, and $maximum is the maximum count for the semaphore.	If
	   $name is omitted, creates an unnamed semaphore object.

	   If $name signifies an existing semaphore object, then $initial and
	   $maximum are ignored and the object is opened.  If this happens,
	   $^E will be set to 183 (ERROR_ALREADY_EXISTS).

       $semaphore = Win32::Semaphore->open($name)
	   Constructor for opening an existing semaphore object.

       $semaphore->release([$increment, [$previous]])
	   Increment the count of $semaphore by $increment (default 1).	 If
	   $increment plus the semaphore's current count is more than its
	   maximum count, the count is not changed.  Returns true if the
	   increment is successful.

	   The semaphore's count (before incrementing) is stored in the second
	   argument (if any).

	   It is not necessary to wait on a semaphore before calling
	   "release", but you'd better know what you're doing.

       $semaphore->wait([$timeout])
	   Wait for $semaphore's count to be nonzero, then decrement it by 1.
	   See "Win32::IPC".

   Deprecated Functions and Methods
       Win32::Semaphore still supports the ActiveWare syntax, but its use is
       deprecated.

       Win32::Semaphore::Create($SemObject,$Initial,$Max,$Name)
	   Use "$SemObject = Win32::Semaphore->new($Initial,$Max,$Name)"
	   instead.

       Win32::Semaphore::Open($SemObject, $Name)
	   Use "$SemObject = Win32::Semaphore->open($Name)" instead.

       $SemObj->Release($Count,$LastVal)
	   Use "$SemObj->release($Count,$LastVal)" instead.

AUTHOR
       Christopher J. Madsen <cjm@pobox.com>

       Loosely based on the original module by ActiveWare Internet Corp.,
       http://www.ActiveWare.com

perl v5.14.2			  2005-09-17			  Semaphore(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net