aboutsummaryrefslogtreecommitdiff
path: root/zencore/workthreadpool.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-03-22 18:30:28 +0100
committerDan Engelbrecht <[email protected]>2022-03-31 11:29:17 +0200
commit8a33fbec64f0b9e95feea3a677a56fc34dfbd7c0 (patch)
tree8cf18d57849b7c598722b21f64514cc6e8f4a4fc /zencore/workthreadpool.cpp
parentWIP (diff)
downloadzen-8a33fbec64f0b9e95feea3a677a56fc34dfbd7c0.tar.xz
zen-8a33fbec64f0b9e95feea3a677a56fc34dfbd7c0.zip
Add Flush to workthreadpool
Diffstat (limited to 'zencore/workthreadpool.cpp')
-rw-r--r--zencore/workthreadpool.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/zencore/workthreadpool.cpp b/zencore/workthreadpool.cpp
index 4291d1581..a6c6bc0f7 100644
--- a/zencore/workthreadpool.cpp
+++ b/zencore/workthreadpool.cpp
@@ -55,6 +55,15 @@ WorkerThreadPool::PendingWork() const
}
void
+WorkerThreadPool::Flush()
+{
+ while (m_WorkQueue.Size() > 0)
+ {
+ Sleep(1);
+ }
+}
+
+void
WorkerThreadPool::WorkerThreadFunction()
{
do