aboutsummaryrefslogtreecommitdiff
path: root/zencore/workthreadpool.cpp
diff options
context:
space:
mode:
authorJoe Kirchoff <[email protected]>2022-03-30 14:15:15 -0700
committerGitHub <[email protected]>2022-03-30 14:15:15 -0700
commiteb33c52b8e338b1bccf0d9d26b56d7ef611f6059 (patch)
tree994b2af87e7b0cfba3250d41227c94d777738dc4 /zencore/workthreadpool.cpp
parentRetain flags for small objects in structured cache (#68) (diff)
downloadzen-eb33c52b8e338b1bccf0d9d26b56d7ef611f6059.tar.xz
zen-eb33c52b8e338b1bccf0d9d26b56d7ef611f6059.zip
Simple file-based compute (#65)
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()
{