From 74d104d4eb3735e0881f0e1fccc2df8aa4d3f57d Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 13 Oct 2023 09:55:27 +0200 Subject: restructured zenhttp (#472) separating the http server implementations into a directory and moved diagsvcs into zenserver since it's somewhat hard-coded for it --- src/zenhttp/iothreadpool.cpp | 54 -------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/zenhttp/iothreadpool.cpp (limited to 'src/zenhttp/iothreadpool.cpp') diff --git a/src/zenhttp/iothreadpool.cpp b/src/zenhttp/iothreadpool.cpp deleted file mode 100644 index da4b42e28..000000000 --- a/src/zenhttp/iothreadpool.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#include "iothreadpool.h" - -#include - -#if ZEN_PLATFORM_WINDOWS - -namespace zen { - -WinIoThreadPool::WinIoThreadPool(int InThreadCount, int InMaxThreadCount) -{ - ZEN_ASSERT(InThreadCount); - - if (InMaxThreadCount < InThreadCount) - { - InMaxThreadCount = InThreadCount; - } - - m_ThreadPool = CreateThreadpool(NULL); - - SetThreadpoolThreadMinimum(m_ThreadPool, InThreadCount); - SetThreadpoolThreadMaximum(m_ThreadPool, InMaxThreadCount); - - 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 -- cgit v1.2.3