HatchitGraphics
|
Public Member Functions | |
virtual void | VStart (std::condition_variable *notifyLock, Core::ThreadsafeQueue< RenderPassHandle > *jobQueue)=0 |
void | Kill () |
Kills the render thread. More... | |
void | Notify () |
Notify the thread that it should unlock because it has new work to process. More... | |
const bool | Processed () const |
Gets whether or not the thread has finished processing. More... | |
Protected Attributes | |
std::thread | m_thread |
std::mutex | m_mutex |
std::condition_variable | m_waitLock |
std::condition_variable * | m_notifyLock |
std::atomic_bool | m_alive |
std::atomic_bool | m_processing |
Core::ThreadsafeQueue< RenderPassHandle > * | m_jobQueue |
void RenderThread::Kill | ( | ) |
Kills the render thread.
Sets this thread's alive and processing states to false and joins the thread onto the main thread. This should cause the thread to shut down asap.
void RenderThread::Notify | ( | ) |
Notify the thread that it should unlock because it has new work to process.
Notifies the underlying locking std::condition_variable to wake up
const bool RenderThread::Processed | ( | ) | const |
Gets whether or not the thread has finished processing.