aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/workthreadpool.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-11-29 09:14:57 -0500
committerGitHub <[email protected]>2023-11-29 15:14:57 +0100
commit68b3382ef7e0f7795b9a601aae73adc2f8ef9873 (patch)
treea8460fa497195575505e14f7beef069ecee31ef7 /src/zencore/workthreadpool.cpp
parentfixed file logger pattern (#579) (diff)
downloadzen-68b3382ef7e0f7795b9a601aae73adc2f8ef9873.tar.xz
zen-68b3382ef7e0f7795b9a601aae73adc2f8ef9873.zip
global thread worker pools (#577)
- Improvement: Use two global worker thread pools instead of ad-hoc creation of worker pools
Diffstat (limited to 'src/zencore/workthreadpool.cpp')
-rw-r--r--src/zencore/workthreadpool.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zencore/workthreadpool.cpp b/src/zencore/workthreadpool.cpp
index e6a6b5c54..6ff6463dd 100644
--- a/src/zencore/workthreadpool.cpp
+++ b/src/zencore/workthreadpool.cpp
@@ -110,6 +110,7 @@ struct WorkerThreadPool::Impl
m_WorkQueue.pop_front();
}
+ ZEN_TRACE_CPU_FLUSH("AsyncWork");
WorkFromQueue->Execute();
}
};
@@ -178,6 +179,7 @@ WorkerThreadPool::Impl::WorkerThreadFunction(ThreadStartInfo Info)
{
try
{
+ ZEN_TRACE_CPU_FLUSH("AsyncWork");
Work->Execute();
}
catch (std::exception& e)
@@ -225,6 +227,7 @@ WorkerThreadPool::ScheduleWork(Ref<IWork> Work)
{
try
{
+ ZEN_TRACE_CPU_FLUSH("SyncWork");
Work->Execute();
}
catch (std::exception& e)