Torque3D Documentation / _generateds / AsyncUpdateThread

AsyncUpdateThread

Engine/source/platform/async/asyncUpdate.h

Abstract baseclass for async update threads.

More...

Public Types

Parent 

Protected Attributes

Name of this thread.

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

Create the update thread.

run(void * arg)

Run the Thread's entry point function.

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.