]> granicus.if.org Git - icinga2/commitdiff
ApiListener: drop unused thread pool
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 13:06:17 +0000 (15:06 +0200)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 13:06:17 +0000 (15:06 +0200)
lib/remote/apilistener.cpp
lib/remote/apilistener.hpp

index 75a676143710c36060c00f54fa849748d5bada47..6da42b68cac514ca98f7544f797eabb93597c6de 100644 (file)
@@ -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<void ()>& callback, SchedulerPolicy policy)
-{
-       GetTP().Post(callback, policy);
-}
-
 void ApiListener::OnConfigLoaded()
 {
        if (m_Instance)
index b88f1de1e351a2e30358e5b747fad2a73803fcc3..7072a157f429803481b3727850c18dedbf4f7e36 100644 (file)
@@ -134,9 +134,6 @@ private:
        void NewClientHandlerInternal(boost::asio::yield_context yc, const std::shared_ptr<AsioTlsStream>& client, const String& hostname, ConnectionRole role);
        void ListenerCoroutineProc(boost::asio::yield_context yc, const std::shared_ptr<boost::asio::ip::tcp::acceptor>& server, const std::shared_ptr<boost::asio::ssl::context>& sslContext);
 
-       static ThreadPool& GetTP();
-       static void EnqueueAsyncCallback(const std::function<void ()>& callback, SchedulerPolicy policy = DefaultScheduler);
-
        WorkQueue m_RelayQueue;
        WorkQueue m_SyncQueue{0, 4};