From 64b2ac4b3031d076671849cf0345541fae82d429 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 1 Apr 2019 15:06:17 +0200 Subject: [PATCH] ApiListener: drop unused thread pool --- lib/remote/apilistener.cpp | 16 ---------------- lib/remote/apilistener.hpp | 3 --- 2 files changed, 19 deletions(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 75a676143..6da42b68c 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -109,22 +109,6 @@ void ApiListener::CopyCertificateFile(const String& oldCertPath, const String& n } } -/** - * Returns the API thread pool. - * - * @returns The API thread pool. - */ -ThreadPool& ApiListener::GetTP() -{ - static ThreadPool tp; - return tp; -} - -void ApiListener::EnqueueAsyncCallback(const std::function& callback, SchedulerPolicy policy) -{ - GetTP().Post(callback, policy); -} - void ApiListener::OnConfigLoaded() { if (m_Instance) diff --git a/lib/remote/apilistener.hpp b/lib/remote/apilistener.hpp index b88f1de1e..7072a157f 100644 --- a/lib/remote/apilistener.hpp +++ b/lib/remote/apilistener.hpp @@ -134,9 +134,6 @@ private: void NewClientHandlerInternal(boost::asio::yield_context yc, const std::shared_ptr& client, const String& hostname, ConnectionRole role); void ListenerCoroutineProc(boost::asio::yield_context yc, const std::shared_ptr& server, const std::shared_ptr& sslContext); - static ThreadPool& GetTP(); - static void EnqueueAsyncCallback(const std::function& callback, SchedulerPolicy policy = DefaultScheduler); - WorkQueue m_RelayQueue; WorkQueue m_SyncQueue{0, 4}; -- 2.40.0