From eeb22dd9cbb5fff666f04553747abca1c4f0f882 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Tue, 24 Nov 2009 22:09:20 +0000 Subject: [PATCH] Threadpool fix; I think this is right; fatpelt may continue to disagree :) --- src/libs/util/bongothreadpool.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/util/bongothreadpool.c b/src/libs/util/bongothreadpool.c index 208314c..bf48f8d 100644 --- a/src/libs/util/bongothreadpool.c +++ b/src/libs/util/bongothreadpool.c @@ -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; }