Threadpool fix; I think this is right; fatpelt may continue to disagree :)
This commit is contained in:
@@ -191,10 +191,6 @@ BongoThreadPoolAddWork(BongoThreadPool *pool,
|
||||
pool->head = item;
|
||||
}
|
||||
|
||||
XplMutexUnlock(pool->lock);
|
||||
|
||||
XplSignalLocalSemaphore(pool->todo);
|
||||
|
||||
/* Possibly spawn a worker */
|
||||
if (spawnThread && (pool->total < pool->maximum)) {
|
||||
XplThreadID id;
|
||||
@@ -204,6 +200,9 @@ BongoThreadPoolAddWork(BongoThreadPool *pool,
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
XplMutexUnlock(pool->lock);
|
||||
XplSignalLocalSemaphore(pool->todo);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user