From 20ac7384f8ca558f1fb933eda846604792240ea0 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 5 Oct 2021 22:25:53 +0200 Subject: Merged from upstream --- zenhttp/iothreadpool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'zenhttp/iothreadpool.cpp') diff --git a/zenhttp/iothreadpool.cpp b/zenhttp/iothreadpool.cpp index 4f1a6642b..6087e69ec 100644 --- a/zenhttp/iothreadpool.cpp +++ b/zenhttp/iothreadpool.cpp @@ -4,6 +4,8 @@ #include +#if ZEN_PLATFORM_WINDOWS + namespace zen { WinIoThreadPool::WinIoThreadPool(int InThreadCount) @@ -32,6 +34,8 @@ WinIoThreadPool::~WinIoThreadPool() void WinIoThreadPool::CreateIocp(HANDLE IoHandle, PTP_WIN32_IO_CALLBACK Callback, void* Context, std::error_code& ErrorCode) { + ZEN_ASSERT(!m_ThreadPoolIo); + m_ThreadPoolIo = CreateThreadpoolIo(IoHandle, Callback, Context, &m_CallbackEnvironment); if (!m_ThreadPoolIo) @@ -41,3 +45,5 @@ WinIoThreadPool::CreateIocp(HANDLE IoHandle, PTP_WIN32_IO_CALLBACK Callback, voi } } // namespace zen + +#endif -- cgit v1.2.3