ThreadIndex#

Fully qualified name: carb::tasking::ThreadIndex

Defined in carb/tasking/TaskingTypes.h

enum class carb::tasking::ThreadIndex : uint32_t#

Thread Index type.

Returned by ITasking::getCurrentThreadIndex() to determine what type of thread a task is running on. If called from a task running on a worker thread, this will return a numeric index, otherwise it returns one of the enumerations indicating the type of thread.

The numeric thread index will be in the range [0, max) where max is TaskingDesc::threadCount as returned by ITasking::getDesc().

If called from a thread not owned by carb.tasking, kExternal will be returned.

Values:

enumerator kEmergency#

Indicates an emergency thread. Note: while there may be multiple emergency threads, they are not indexed. Use the thread ID to differentiate between them.

enumerator kMain#

Indicates the main thread. Only one thread may be known as the Main thread for the lifetime of carb.tasking.

enumerator kExternal#

Indicates an external thread. Note: while there may be multiple external threads, they are not indexed. Use the thread ID to differentiate between them.