DCL 3.7.6
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 403 of file Thread.h.

Constructor & Destructor Documentation

◆ SingleLock()

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

Definition at line 420 of file Thread.h.

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

◆ ~SingleLock()

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

Definition at line 432 of file Thread.h.

433{
434 if (__lock) {
435 __lock->unlock();
436 }
437}

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