Commit d4b099b8 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Update the rear pointer when enqueuing a closure.

Change-Id: Ibc800b5384adbaa45b9d7418bc8e7be6df8f5bb6
parent 4b65ef9e
......@@ -250,6 +250,7 @@ SLresult ThreadPool_add(ThreadPool *tp, void (*handler)(void *, int), void *cont
}
assert(NULL == *oldRear);
*oldRear = closure;
tp->mClosureRear = newRear;
// if a worker thread was waiting to dequeue, then suggest that it try again
if (0 < tp->mWaitingNotEmpty) {
--tp->mWaitingNotEmpty;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment