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).
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StormByte::ThreadLock Class Referencefinal

Public Member Functions

 ThreadLock (const ThreadLock &)=delete
 
 ThreadLock (ThreadLock &&)=delete
 
 ~ThreadLock () noexcept
 Destroy the ThreadLock and release any held resources.
 
ThreadLockoperator= (const ThreadLock &)=delete
 
ThreadLockoperator= (ThreadLock &&)=delete
 
void Lock () noexcept
 Acquire the lock.
 
void Unlock () noexcept
 Release the lock.
 

Constructor & Destructor Documentation

◆ ~ThreadLock()

StormByte::ThreadLock::~ThreadLock ( )
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.

Member Function Documentation

◆ Lock()

void StormByte::ThreadLock::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.

◆ Unlock()

void StormByte::ThreadLock::Unlock ( )
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.


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