From 6ec26c46d694a1d5291790a9c70bec25dce4b513 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 9 Sep 2021 15:14:08 +0200 Subject: Factored out http server related code into zenhttp module since it feels out of place in zencore --- zencore/iothreadpool.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 zencore/iothreadpool.cpp (limited to 'zencore/iothreadpool.cpp') diff --git a/zencore/iothreadpool.cpp b/zencore/iothreadpool.cpp deleted file mode 100644 index 4ed81d7a2..000000000 --- a/zencore/iothreadpool.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#include "iothreadpool.h" - -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) -{ - m_ThreadPoolIo = CreateThreadpoolIo(IoHandle, Callback, Context, &m_CallbackEnvironment); -} - -} // namespace zen -- cgit v1.2.3