Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions | List of all members
ThreadManager Class Reference

`#include <thread.h>`

## Static Public Member Functions
static bool | isCurrentThread (ThreadIdent threadId)
| Returns true if threadId is the same as the calling thread's id. More...
static bool | compare (ThreadIdent threadId_1, ThreadIdent threadId_2)
static ThreadIdent | getCurrentThreadId ()
static void | addThread (Thread *thread)
| Each thread should add itself to the thread pool the first time it runs. More...
static void | removeThread (Thread *thread)
static Thread * | getThreadById (ThreadIdent threadid)
static Thread * | getCurrentThread ()

## Member Function Documentation

static void addThread | ( | Thread * | thread | ) |
| inline static

Each thread should add itself to the thread pool the first time it runs.

bool compare | ( | ThreadIdent | threadId_1,
|  | ThreadIdent | threadId_2
| ) |  |
| static

Returns true if the 2 thread ids represent the same thread. Some thread APIs return an opaque object as a thread id, so the == operator cannot reliably compare thread ids.

static Thread* getCurrentThread | ( |  | ) |
| inline static

U32 getCurrentThreadId | ( |  | ) |
| static

Returns the platform specific thread id of the calling thread. Some platforms do not guarantee that this ID stays the same over the life of the thread, so use ThreadManager::compare() to compare thread ids.

static Thread* getThreadById | ( | ThreadIdent | threadid | ) |
| inline static

Searches the pool of known threads for a thread whose id is equivalent to the given threadid. Compares thread ids with ThreadManager::compare().

bool isCurrentThread | ( | ThreadIdent | threadId | ) |
| inline static

Returns true if threadId is the same as the calling thread's id.

static void removeThread | ( | Thread * | thread | ) |
| inline static

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

- platform/threads/thread.h
- platformAndroid/AndroidThread.cpp
- platformEmscripten/EmscriptenThread.cpp