From 26c7db81cbc8d097230ca4748403ad88c5bea261 Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 26 Jan 2022 22:33:25 +0800 Subject: [PATCH] fix task process Signed-off-by: Rain --- event_loop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event_loop.h b/event_loop.h index 0feeb39..d9954d9 100644 --- a/event_loop.h +++ b/event_loop.h @@ -176,7 +176,7 @@ public: delete data; } // schedule normal task - if (!task_queue_.empty()) { + while (!task_queue_.empty()) { std::unique_ptr task(task_queue_.front()); task_queue_.pop_front(); task->run();