Update the rear pointer when enqueuing a closure. Change-Id: Ibc800b5384adbaa45b9d7418bc8e7be6df8f5bb6
diff --git a/libopensles/ThreadPool.c b/libopensles/ThreadPool.c index 59ed4a0..a00d1a0 100644 --- a/libopensles/ThreadPool.c +++ b/libopensles/ThreadPool.c
@@ -250,6 +250,7 @@ } 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;