aboutsummaryrefslogtreecommitdiff
path: root/zencore/workthreadpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/workthreadpool.cpp')
-rw-r--r--zencore/workthreadpool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/workthreadpool.cpp b/zencore/workthreadpool.cpp
index 4291d1581..b4328cdbd 100644
--- a/zencore/workthreadpool.cpp
+++ b/zencore/workthreadpool.cpp
@@ -45,7 +45,7 @@ WorkerThreadPool::ScheduleWork(Ref<IWork> Work)
void
WorkerThreadPool::ScheduleWork(std::function<void()>&& Work)
{
- m_WorkQueue.Enqueue(new detail::LambdaWork(Work));
+ m_WorkQueue.Enqueue(Ref<IWork>(new detail::LambdaWork(Work)));
}
[[nodiscard]] size_t
@@ -80,4 +80,4 @@ WorkerThreadPool::WorkerThreadFunction()
} while (true);
}
-} // namespace zen \ No newline at end of file
+} // namespace zen