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

Method removeThread

Engine/source/platform/threads/thread.h:182–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 static void removeThread(Thread* thread)
183 {
184 ThreadManager &manager = *ManagedSingleton< ThreadManager >::instance();
185 manager.poolLock.lock();
186
187 U32 threadID = thread->getId();
188 for(U32 i = 0;i < manager.threadPool.size();++i)
189 {
190 if( compare( manager.threadPool[i]->getId(), threadID ) )
191 {
192 manager.threadPool.erase(i);
193 break;
194 }
195 }
196
197 manager.poolLock.unlock();
198 }
199
200 /// Searches the pool of known threads for a thread whose id is equivalent to
201 /// the given threadid. Compares thread ids with ThreadManager::compare().

Callers

nothing calls this directly

Calls 6

compareFunction · 0.85
lockMethod · 0.45
getIdMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected