RunnableServiceWithWork::StopWorkAndFinishTasks added

This commit is contained in:
orignal
2026-07-27 14:01:21 -04:00
parent 672f9c0197
commit de37abd34e
2 changed files with 14 additions and 5 deletions
+9 -2
View File
@@ -141,12 +141,13 @@ namespace util
}
}
void RunnableService::StopIOService ()
void RunnableService::StopIOService (bool stopService)
{
if (m_IsRunning)
{
m_IsRunning = false;
m_Service.stop ();
if (stopService)
m_Service.stop ();
if (m_Thread)
{
m_Thread->join ();
@@ -180,6 +181,12 @@ namespace util
m_Name = name.substr(0,15);
}
void RunnableServiceWithWork::StopWorkAndFinishTasks ()
{
m_Work.reset ();
StopIOService (false);
}
void SetThreadName (const char *name) {
#if defined(__APPLE__)
# if (!defined(MAC_OS_X_VERSION_10_6) || \