From 65f17be82ed1a8987ed960fa3dbc3fb05145ddf3 Mon Sep 17 00:00:00 2001 From: coderstephen Date: Fri, 28 Aug 2015 00:20:32 -0500 Subject: [PATCH] Call done() after creating coroutine --- src/Worker/WorkerPool.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Worker/WorkerPool.php b/src/Worker/WorkerPool.php index f1b2ab8..55c019b 100644 --- a/src/Worker/WorkerPool.php +++ b/src/Worker/WorkerPool.php @@ -233,7 +233,8 @@ class WorkerPool // Spawn a new coroutine to process the busy queue if not empty. if (!$this->busyQueue->isEmpty()) { - new Coroutine($this->processBusyQueue()); + $coroutine = new Coroutine($this->processBusyQueue()); + $coroutine->done(); } }