aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/servers/iothreadpool.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-12-11 13:09:03 +0100
committerStefan Boberg <[email protected]>2023-12-11 13:09:03 +0100
commit93afeddbc7a5b5df390a29407f5515acd5a70fc1 (patch)
tree6f85ee551aabe20dece64a750c0b2d5d2c5d2d5d /src/zenhttp/servers/iothreadpool.cpp
parentremoved unnecessary SHA1 references (diff)
parentMake sure that PathFromHandle don't hide true error when throwing exceptions ... (diff)
downloadzen-93afeddbc7a5b5df390a29407f5515acd5a70fc1.tar.xz
zen-93afeddbc7a5b5df390a29407f5515acd5a70fc1.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'src/zenhttp/servers/iothreadpool.cpp')
-rw-r--r--src/zenhttp/servers/iothreadpool.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenhttp/servers/iothreadpool.cpp b/src/zenhttp/servers/iothreadpool.cpp
index da4b42e28..e941606e2 100644
--- a/src/zenhttp/servers/iothreadpool.cpp
+++ b/src/zenhttp/servers/iothreadpool.cpp
@@ -33,7 +33,12 @@ WinIoThreadPool::WinIoThreadPool(int InThreadCount, int InMaxThreadCount)
WinIoThreadPool::~WinIoThreadPool()
{
+ // this will wait for all callbacks to complete and tear down the `CreateThreadpoolIo`
+ // object and release all related objects
+ CloseThreadpoolCleanupGroupMembers(m_CleanupGroup, /* cancel pending callbacks */ TRUE, nullptr);
+ CloseThreadpoolCleanupGroup(m_CleanupGroup);
CloseThreadpool(m_ThreadPool);
+ DestroyThreadpoolEnvironment(&m_CallbackEnvironment);
}
void