diff options
Diffstat (limited to 'zenhttp/iothreadpool.cpp')
| -rw-r--r-- | zenhttp/iothreadpool.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/zenhttp/iothreadpool.cpp b/zenhttp/iothreadpool.cpp deleted file mode 100644 index 6087e69ec..000000000 --- a/zenhttp/iothreadpool.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#include "iothreadpool.h" - -#include <zencore/except.h> - -#if ZEN_PLATFORM_WINDOWS - -namespace zen { - -WinIoThreadPool::WinIoThreadPool(int InThreadCount) -{ - // Thread pool setup - - m_ThreadPool = CreateThreadpool(NULL); - - SetThreadpoolThreadMinimum(m_ThreadPool, InThreadCount); - SetThreadpoolThreadMaximum(m_ThreadPool, InThreadCount * 2); - - InitializeThreadpoolEnvironment(&m_CallbackEnvironment); - - m_CleanupGroup = CreateThreadpoolCleanupGroup(); - - SetThreadpoolCallbackPool(&m_CallbackEnvironment, m_ThreadPool); - - SetThreadpoolCallbackCleanupGroup(&m_CallbackEnvironment, m_CleanupGroup, NULL); -} - -WinIoThreadPool::~WinIoThreadPool() -{ - CloseThreadpool(m_ThreadPool); -} - -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) - { - ErrorCode = MakeErrorCodeFromLastError(); - } -} - -} // namespace zen - -#endif |