MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / addThread

Method addThread

Engine/source/platform/threads/thread.h:172–180  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

170
171 /// Each thread should add itself to the thread pool the first time it runs.
172 static void addThread(Thread* thread)
173 {
174 ThreadManager &manager = *ManagedSingleton< ThreadManager >::instance();
175 manager.poolLock.lock();
176 Thread *alreadyAdded = getThreadById(thread->getId());
177 if(!alreadyAdded)
178 manager.threadPool.push_back(thread);
179 manager.poolLock.unlock();
180 }
181
182 static void removeThread(Thread* thread)
183 {

Callers

nothing calls this directly

Calls 4

lockMethod · 0.45
getIdMethod · 0.45
push_backMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected