home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / Win32 / Semaphore.pm < prev    next >
Encoding:
Perl POD Document  |  1997-08-10  |  1.3 KB  |  71 lines

  1. package Win32::Semaphore;
  2. use Win32::IPC;
  3. require Exporter;
  4. require DynaLoader;
  5. require AutoLoader;
  6.  
  7. @ISA = qw(Exporter DynaLoader Win32::IPC);
  8.  
  9. $VERSION = '0.01';
  10.  
  11. =head1    NAME
  12.  
  13. Win32::Semaphore - allow synchronization with Win32 Semaphore objects.
  14.  
  15. =head1 SYNOPSIS
  16.     use Win32::Semaphore;
  17.  
  18.     Win32::Semaphore::Create($SemObj,0,1,"MySem");
  19.     $SemObj->Wait(INFINITE);
  20.  
  21.  
  22. =head1 DESCRIPTION
  23.  
  24. This module allows the user to access Win32 semaphores.
  25.  
  26. =head1 METHODS
  27.  
  28. =over 8
  29.  
  30. =item Win32::Semaphore::Create($SemObject,$Initial,$Max,$Name)
  31.  
  32. Creates a semaphore object.
  33.  
  34.     Args:
  35.     $SemObject    container for the sem objects
  36.      $Initial    initial count of the semaphore
  37.     $Max         max count of the semaphore
  38.     $Name        name (string)
  39.  
  40.  
  41. =item Win32::Semaphore::Open($SemObject, $Name)
  42.  
  43. Open an already created named semaphore.
  44.  
  45.     Args:
  46.     $SemObject    container for the sem object
  47.     $Name        name of the semaphore to open
  48.  
  49.  
  50. =item $SemObj->Release($Count,$lastval)
  51.  
  52. Release ownership of a semphore object.
  53.  
  54.     Args:
  55.     $Count        amount to increase semaphore count
  56.     $lastval    previous value of the semaphore count
  57.  
  58.  
  59. =item $SemObj->Wait($TimeOut)        
  60.  
  61. Wait for ownership of a semaphore object.
  62.  
  63. =back
  64.  
  65. =cut
  66.  
  67. bootstrap Win32::Semaphore;
  68.  
  69. 1;
  70. __END__
  71.