aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-01-10 13:46:22 +0100
committerMartin Ridgers <[email protected]>2022-01-10 13:46:50 +0100
commitfe3225e42c316581fa66d482bfe5a406299f4305 (patch)
treec36eb89df340aa4ca27a221c6db072953a997d2b /zenserver/zenserver.cpp
parentMoving a temporary prevents copy elision optimization (diff)
downloadzen-fe3225e42c316581fa66d482bfe5a406299f4305.tar.xz
zen-fe3225e42c316581fa66d482bfe5a406299f4305.zip
std::jthread is not supported on Apple Clang
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index f96fccdac..8fb91c890 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -361,6 +361,7 @@ public:
ZEN_INFO(ZEN_APP_NAME " exiting");
m_IoContext.stop();
+ m_IoRunner.join();
Flush();
}
@@ -386,7 +387,7 @@ public:
{
if (!m_IoRunner.joinable())
{
- m_IoRunner = std::jthread{[this] { m_IoContext.run(); }};
+ m_IoRunner = std::thread{[this] { m_IoContext.run(); }};
}
}
@@ -482,7 +483,7 @@ private:
CbObject m_RootManifest;
std::filesystem::path m_DataRoot;
std::filesystem::path m_ContentRoot;
- std::jthread m_IoRunner;
+ std::thread m_IoRunner;
asio::io_context m_IoContext;
asio::steady_timer m_PidCheckTimer{m_IoContext};
zen::ProcessMonitor m_ProcessMonitor;