From 8a33fbec64f0b9e95feea3a677a56fc34dfbd7c0 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 22 Mar 2022 18:30:28 +0100 Subject: Add Flush to workthreadpool --- zencore/workthreadpool.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'zencore/workthreadpool.cpp') diff --git a/zencore/workthreadpool.cpp b/zencore/workthreadpool.cpp index 4291d1581..a6c6bc0f7 100644 --- a/zencore/workthreadpool.cpp +++ b/zencore/workthreadpool.cpp @@ -54,6 +54,15 @@ WorkerThreadPool::PendingWork() const return m_WorkQueue.Size(); } +void +WorkerThreadPool::Flush() +{ + while (m_WorkQueue.Size() > 0) + { + Sleep(1); + } +} + void WorkerThreadPool::WorkerThreadFunction() { -- cgit v1.2.3