A class that manages thread states and provides utilities for thread handling.
More...
#include <thread_manager.hpp>
A class that manages thread states and provides utilities for thread handling.
◆ getThreadState()
Retrieves the thread state managed by this ThreadManager.
- Returns
- A reference to the thread state.
◆ lockPlayMutex()
void ThreadManager::lockPlayMutex |
( |
ThreadState & | thread_state | ) |
|
|
inline |
Locks the play mutex for the provided thread state.
This function uses a unique lock to ensure that the play mutex is safely locked while performing operations on the thread state.
- Parameters
-
thread_state | A reference to the ThreadState object whose mutex is to be locked. |
◆ unlockPlayMutex()
void ThreadManager::unlockPlayMutex |
( |
ThreadState & | thread_state | ) |
|
|
inline |
Unlocks the play mutex for the provided thread state.
This function releases the lock on the play mutex that was previously acquired using lockPlayMutex
. The play mutex will be unlocked after this function is called.
- Parameters
-
thread_state | A reference to the ThreadState object whose mutex is to be unlocked. |
- Note
- This function should be used in conjunction with
lockPlayMutex
to ensure proper synchronization.
The documentation for this class was generated from the following file: