HatchitGraphics
Public Member Functions | Protected Attributes | List of all members
Hatchit::Graphics::RenderThread Class Referenceabstract
Inheritance diagram for Hatchit::Graphics::RenderThread:
Hatchit::Graphics::Vulkan::VKRenderThread

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
 

Member Function Documentation

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.

Returns
A boolean representing whether or not this thread has finished working.

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