Torque3D Documentation / _generateds / ThreadPool::Context

ThreadPool::Context

Engine/source/platform/threads/threadPool.h

A ThreadPool context defines a logical context in which WorkItems are being executed.

More...

Protected Attributes

Accumulated scale factor.

First child.

const char *

Name of this context. Should be unique in parent namespace.

Superordinate context; scales this context's priority bias.

Priority scale factor of this context.

Next sibling in child chain.

Protected Static Attributes

The root context; does not modify priorities. All contexts should be direct or indirect children of this one.

Protected Functions

Recursively update cached accumulated priority biases.

Public Functions

Context(const char * name, Context * parent, F32 priorityBias)
getChild(const char * name)

Return the first child context.

const char *

Return the name of the worker threading context.

Return the superordinate node to the current context.

Return the context's own work item priority bias.

Return the next sibling to the current context.

Public Static Functions

Return the root context.

Detailed Description

A ThreadPool context defines a logical context in which WorkItems are being executed.

Their primary use is for biasing priorities of WorkItems.

Contexts are arranged in a tree hierarchy. Each parent node's priority bias scales all the priority biases underneath it.

Note that instances of this class are meant to be instantiated globally only.

Protected Attributes

F32 mAccumulatedPriorityBias 

Accumulated scale factor.

Context * mChildren 

First child.

const char * mName 

Name of this context. Should be unique in parent namespace.

Context * mParent 

Superordinate context; scales this context's priority bias.

F32 mPriorityBias 

Priority scale factor of this context.

Context * mSibling 

Next sibling in child chain.

Protected Static Attributes

Context smRootContext 

The root context; does not modify priorities. All contexts should be direct or indirect children of this one.

Protected Functions

updateAccumulatedPriorityBiases()

Recursively update cached accumulated priority biases.

Public Functions

Context(const char * name, Context * parent, F32 priorityBias)

~Context()

getAccumulatedPriorityBias()

getChild(const char * name)

getChildren()

Return the first child context.

getName()

Return the name of the worker threading context.

getParent()

Return the superordinate node to the current context.

getPriorityBias()

Return the context's own work item priority bias.

getSibling()

Return the next sibling to the current context.

setPriorityBias(F32 value)

Public Static Functions

ROOT_CONTEXT()

Return the root context.