aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/iothreadpool.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-13 09:55:27 +0200
committerGitHub <[email protected]>2023-10-13 09:55:27 +0200
commit74d104d4eb3735e0881f0e1fccc2df8aa4d3f57d (patch)
treeacae59dac67b4d051403f35e580201c214ec4fda /src/zenhttp/iothreadpool.cpp
parentfaster oplog iteration (#471) (diff)
downloadzen-74d104d4eb3735e0881f0e1fccc2df8aa4d3f57d.tar.xz
zen-74d104d4eb3735e0881f0e1fccc2df8aa4d3f57d.zip
restructured zenhttp (#472)
separating the http server implementations into a directory and moved diagsvcs into zenserver since it's somewhat hard-coded for it
Diffstat (limited to 'src/zenhttp/iothreadpool.cpp')
-rw-r--r--src/zenhttp/iothreadpool.cpp54
1 files changed, 0 insertions, 54 deletions
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 <zencore/except.h>
-
-#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