SASC-NG
DVBSoftCAM

cThreadLock Class Reference

#include <thread.h>

List of all members.

Public Member Functions

 cThreadLock (cThread *Thread=NULL)
 ~cThreadLock ()
bool Lock (cThread *Thread)

Detailed Description

Definition at line 147 of file thread.h.


Constructor & Destructor Documentation

cThreadLock::cThreadLock ( cThread *  Thread = NULL)

Definition at line 350 of file thread.cpp.

References Lock(), and NULL.

{
  thread = NULL;
  locked = false;
  Lock(Thread);
}
cThreadLock::~cThreadLock ( )

Definition at line 357 of file thread.cpp.

References cThread::Unlock().

{
  if (thread && locked)
     thread->Unlock();
}

Member Function Documentation

bool cThreadLock::Lock ( cThread *  Thread)

Definition at line 363 of file thread.cpp.

References cThread::Lock().

Referenced by cThreadLock().

{
  if (Thread && !thread) {
     thread = Thread;
     Thread->Lock();
     locked = true;
     return true;
     }
  return false;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines