aboutsummaryrefslogtreecommitdiff
path: root/zencore/workthreadpool.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-04-25 11:22:43 +0200
committerPer Larsson <[email protected]>2022-04-25 11:22:43 +0200
commit1e7c5d062327ec249d3daae0f9ce61a03c4e76b2 (patch)
tree893423c3d0b28f1d08b7ce1b138f4e1b4e45537c /zencore/workthreadpool.cpp
parentMerge branch 'main' into ddcref (diff)
parentCompute tweaks (#78) (diff)
downloadzen-1e7c5d062327ec249d3daae0f9ce61a03c4e76b2.tar.xz
zen-1e7c5d062327ec249d3daae0f9ce61a03c4e76b2.zip
Merge branch 'main' into ddcref
Diffstat (limited to 'zencore/workthreadpool.cpp')
-rw-r--r--zencore/workthreadpool.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/zencore/workthreadpool.cpp b/zencore/workthreadpool.cpp
index 3fd1d11a6..4291d1581 100644
--- a/zencore/workthreadpool.cpp
+++ b/zencore/workthreadpool.cpp
@@ -48,6 +48,12 @@ WorkerThreadPool::ScheduleWork(std::function<void()>&& Work)
m_WorkQueue.Enqueue(new detail::LambdaWork(Work));
}
+[[nodiscard]] size_t
+WorkerThreadPool::PendingWork() const
+{
+ return m_WorkQueue.Size();
+}
+
void
WorkerThreadPool::WorkerThreadFunction()
{