AsyncUpdateThread
Engine/source/platform/async/asyncUpdate.h
Abstract baseclass for async update threads.
Public Types
Parent
Protected Attributes
void *
Platform-dependent event data.
The update list processed on this thread.
Protected Functions
Wait for an update event being triggered and immediately reset the event.
Public Functions
AsyncUpdateThread(String name, AsyncUpdateList * updateList)
Create the update thread.
void *
Trigger the update event to notify the thread about pending updates.
Detailed Description
Abstract baseclass for async update threads.
Public Types
typedef Thread Parent
Protected Attributes
String mName
Name of this thread.
void * mUpdateEvent
Platform-dependent event data.
ThreadSafeRef< AsyncUpdateList > mUpdateList
The update list processed on this thread.
Protected Functions
_waitForEventAndReset()
Wait for an update event being triggered and immediately reset the event.
note:Note that this must be an atomic operation to avoid a race condition. Immediately resetting the event shields us from event releases happening during us updating getting ignored.
Reimplemented by: AsyncPeriodicUpdateThread
Public Functions
AsyncUpdateThread(String name, AsyncUpdateList * updateList)
Create the update thread.
The thread won't immediately start (we have virtual functions so construction needs to finish first) and will not auto-delete itself.
~AsyncUpdateThread()
getName()
getUpdateEvent()
run(void * arg)
Reimplemented from: Thread
triggerUpdate()
Trigger the update event to notify the thread about pending updates.