DCL 3.7.4
Loading...
Searching...
No Matches
Thread::SingleLock< TYPE > Class Template Reference

#include <Thread.h>

Public Member Functions

 SingleLock (TYPE &_lock)
 ~SingleLock ()

Detailed Description

template<typename TYPE>
class Thread::SingleLock< TYPE >

Definition at line 401 of file Thread.h.

Constructor & Destructor Documentation

◆ SingleLock()

template<typename TYPE>
Thread::SingleLock< TYPE >::SingleLock ( TYPE & _lock)
inline

Definition at line 418 of file Thread.h.

419{
420 if (_lock.locker() != Thread::self()) {
421 __lock = &_lock;
422 __lock->lock();
423 }
424 else {
425 __lock = NULL;
426 }
427}

◆ ~SingleLock()

template<typename TYPE>
Thread::SingleLock< TYPE >::~SingleLock ( )
inline

Definition at line 430 of file Thread.h.

431{
432 if (__lock) {
433 __lock->unlock();
434 }
435}

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