Lib/Emscripten/EmscriptenThreads.cpp
static bool removeThreadById(Process* process,
							 emabi::pthread_t threadId,
							 IntrusiveSharedPtr<Thread>& outThread)
{
	Platform::Mutex::Lock threadsLock(process->threadsMutex);
	if(!validateThreadId(process, threadId)) { return false; }
	outThread = std::move(process->threads[threadId]);
	process->threads.removeOrFail(threadId);

	WAVM_ASSERT(outThread->id == threadId);
	outThread->id = 0;

	return true;
}
// Validates a thread ID, removes the corresponding thread from the threads array, and returns it.
Validates a thread ID, removes the corresponding thread from the threads array, and returns it.
Validates a thread ID removes the corresponding thread from the threads array and returns it .
static bool removeThreadById(Process* process,
							 emabi::pthread_t threadId,
							 IntrusiveSharedPtr<Thread>& outThread)
{
	Platform::Mutex::Lock threadsLock(process->threadsMutex);
	if(!validateThreadId(process, threadId)) { return false; }
	outThread = std::move(process->threads[threadId]);
	process->threads.removeOrFail(threadId);
	WAVM_ASSERT(outThread->id == threadId);
	outThread->id = 0;
	return true;
}
static bool removeThreadById ( Process * process , emabi :: pthread_t threadId , IntrusiveSharedPtr < Thread > & outThread ) { Platform :: Mutex :: Lock threadsLock ( process -> threadsMutex ) ; if ( ! validateThreadId ( process , threadId ) ) { return false ; } outThread = std :: move ( process -> threads [ threadId ] ) ; process -> threads . removeOrFail ( threadId ) ; WAVM_ASSERT ( outThread -> id == threadId ) ; outThread -> id = 0 ; return true ; }
Validates a thread ID, removes the corresponding thread from the threads array, and returns it.
Validates a thread ID removes the corresponding thread from the threads array and returns it .