Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | List of all members
SysThreadLock Class Reference
Inheritance diagram for SysThreadLock:
SysThreadLockBase ResourceBundleItem

Classes

struct  DeadLockException
 

Public Member Functions

void lock (const Duration &duration_hint=MEDIUM) noexcept(false)
 
bool try_lock (const Duration &duration_hint=MEDIUM) noexcept(false)
 
void unlock ()
 
void lock_short ()
 
void lock_long ()
 
bool try_lock_short ()
 
bool try_lock_long ()
 
- Public Member Functions inherited from SysThreadLockBase
bool is_locked () const
 
SysThreadId * get_locking_thread () const
 

Additional Inherited Members

- Public Types inherited from SysThreadLockBase
enum  Duration {
  SHORT = 0,
  MEDIUM,
  LONG,
  DURATION_COUNT
}
 

Member Function Documentation

void SysThreadLock::lock ( const Duration &  duration_hint = MEDIUM)
noexcept

Locks this lock and blocks until locked.

Exceptions
SysThreadLock::DeadLockExceptionThrown when attempting to lock an already locked lock from the same thread.
Parameters
duration_hintHint for waiting duration.
bool SysThreadLock::try_lock ( const Duration &  duration_hint = MEDIUM)
noexcept

Tries to lock this lock and returns immediately.

Exceptions
SysThreadLock::DeadLockExceptionThrown when attempting to lock an already locked lock from the same thread.
Parameters
duration_hintHint for waiting duration.
Returns
true on lock success, false if already locked.