mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Remove comments.
This commit is contained in:
parent
f3199b04e4
commit
ae4ac53592
2 changed files with 1 additions and 14 deletions
|
|
@ -412,18 +412,7 @@ void ThreadPool::queueWorkItem( WorkItem* item )
|
|||
|
||||
mWorkItemQueue.insert( item->getPriority(), item );
|
||||
|
||||
// Wake up some thread, if we need to.
|
||||
// Use the ready count here as the wake count does
|
||||
// not correctly protect the critical section in the
|
||||
// thread's run function. This may lead us to release
|
||||
// the semaphore more often than necessary, but it avoids
|
||||
// a race condition.
|
||||
|
||||
//Wasn't there still a race condition? Why not rely entirely on the semaphore?
|
||||
//For example, mNumThreadsReady initializes equalto mNumThreads, which could cause
|
||||
//initial work items to hang.
|
||||
//if( !dCompareAndSwap( mNumThreadsReady, mNumThreads, mNumThreads ) )
|
||||
mSemaphore.release();
|
||||
mSemaphore.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue