summaryrefslogtreecommitdiff
path: root/pool.cpp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:44 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:44 +0200
commitc507ce3198ea4d822832cc8740f0128df8873c02 (patch)
tree260ca004916ae03b7d5438bf89007e3984da6934 /pool.cpp
parentc8b2ef7b899766d04562f7e04a84251cea8fa701 (diff)
tagging ychat-0.3ychat-0.3
Diffstat (limited to 'pool.cpp')
-rwxr-xr-xpool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/pool.cpp b/pool.cpp
index a8c1556..470ea24 100755
--- a/pool.cpp
+++ b/pool.cpp
@@ -197,6 +197,7 @@ pool::tpool_add_work( tpool_t tpool, void(*routine)(void*), void* arg ) ///
if( tpool->cur_queue_size == 0 )
{
tpool->queue_tail = tpool->queue_head = workp;
+ pthread_cond_signal( &(tpool->queue_not_empty) );
}
else
@@ -206,7 +207,6 @@ pool::tpool_add_work( tpool_t tpool, void(*routine)(void*), void* arg ) ///
}
tpool->cur_queue_size++;
- pthread_cond_signal( &(tpool->queue_not_empty) );
pthread_mutex_unlock( &(tpool->queue_lock) );
return 1;
}