aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/iothreadpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenhttp/iothreadpool.cpp')
-rw-r--r--zenhttp/iothreadpool.cpp6
1 files changed, 6 insertions, 0 deletions
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 <zencore/except.h>
+#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