|
StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
|
Public Member Functions | |
| ThreadLock (const ThreadLock &)=delete | |
| ThreadLock (ThreadLock &&)=delete | |
| ~ThreadLock () noexcept | |
| Destroy the ThreadLock and release any held resources. | |
| ThreadLock & | operator= (const ThreadLock &)=delete |
| ThreadLock & | operator= (ThreadLock &&)=delete |
| void | Lock () noexcept |
| Acquire the lock. | |
| void | Unlock () noexcept |
| Release the lock. | |
|
noexcept |
Destroy the ThreadLock and release any held resources.
The destructor releases internal resources. The owning thread should call Unlock() before destruction if it currently holds the lock.
|
noexcept |
Acquire the lock.
If the calling thread already owns the lock, this call returns immediately. Otherwise the call blocks until the lock becomes available and the calling thread becomes the owner.
|
noexcept |
Release the lock.
Releases ownership and unlocks the mutex. After a successful call, other blocked threads (if any) may acquire the lock. If the calling thread does not own the lock, Unlock() is a no-op and returns immediately.