GSemaphore Class Reference

Thread locking. More...

#include <GSemaphore.h>

Inheritance diagram for GSemaphore:

Progress GProgress GProgressPane

List of all members.

Public Member Functions

 GSemaphore (char *name=0)
 Constructor.
bool Lock (char *file, int line)
bool LockWithTimeout (int Timeout, char *file, int line)
void Unlock ()
 Unlocks the semaphore.


Detailed Description

Thread locking.

Constructor & Destructor Documentation

GSemaphore::GSemaphore ( char *  name = 0  ) 

Constructor.

Parameters:
name  Optional name for the semaphore


Member Function Documentation

bool GSemaphore::Lock ( char *  file,
int  line 
)

Lock the semaphore, waiting forever

Returns:
true if locked successfully.
Parameters:
file  The file name of the locker
line  The line number of the locker

References LgiSleep.

Referenced by GView::Lock(), GDocumentEnv::OnDone(), and MailSmtp::Open().

bool GSemaphore::LockWithTimeout ( int  Timeout,
char *  file,
int  line 
)

Returns:
true if the semephore was locked in the time
Parameters:
Timeout  In ms
file  The file of the locker
line  The line number of the locker

References LgiSleep.

Referenced by GView::Lock().


The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen 1.5.7.1