#include <GSemaphore.h>
Public Member Functions | |
GSemaphore (const char *name=0) | |
Constructor. | |
bool | Lock (const char *file, int line) |
bool | LockWithTimeout (int Timeout, const char *file, int line) |
void | Unlock () |
Unlocks the semaphore. |
GSemaphore::GSemaphore | ( | const char * | name = 0 |
) |
Constructor.
name | Optional name for the semaphore |
bool GSemaphore::Lock | ( | const char * | file, | |
int | line | |||
) |
Lock the semaphore, waiting forever
file | The file name of the locker |
line | The line number of the locker |
References LgiSleep.
Referenced by GView::Lock(), GDocumentEnv::OnDone(), MailSmtp::Open(), and GFile::Open().
bool GSemaphore::LockWithTimeout | ( | int | Timeout, | |
const char * | file, | |||
int | line | |||
) |
Timeout | In ms |
file | The file of the locker |
line | The line number of the locker |
References LgiSleep.
Referenced by GView::Lock().