From: Alexander A. Klimov Date: Mon, 1 Apr 2019 13:06:17 +0000 (+0200) Subject: ApiListener: drop unused thread pool X-Git-Tag: v2.11.0-rc1~174^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64b2ac4b3031d076671849cf0345541fae82d429;p=icinga2 ApiListener: drop unused thread pool --- 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};