6#ifndef THREAD_MANAGER_HPP
7#define THREAD_MANAGER_HPP
64 std::unique_lock<std::mutex> lock(thread_state.play_mutex);
82 ThreadState thread_state;
A class that manages thread states and provides utilities for thread handling.
Definition thread_manager.hpp:19
void unlockPlayMutex(ThreadState &thread_state)
Unlocks the play mutex for the provided thread state.
Definition thread_manager.hpp:76
ThreadState & getThreadState()
Retrieves the thread state managed by this ThreadManager.
Definition thread_manager.hpp:52
void lockPlayMutex(ThreadState &thread_state)
Locks the play mutex for the provided thread state.
Definition thread_manager.hpp:62
Represents the state of a thread managed by ThreadManager.
Definition thread_manager.hpp:26
std::future< void > play_future
A future object associated with the play operation.
Definition thread_manager.hpp:45
std::mutex play_mutex
A mutex to synchronize access to the play state.
Definition thread_manager.hpp:30
std::atomic< bool > is_processing
Indicates whether the thread is currently processing.
Definition thread_manager.hpp:35
std::atomic< bool > is_playing
Indicates whether the thread is currently playing.
Definition thread_manager.hpp:40