ApiListener: drop unused thread pool

This commit is contained in:
Alexander A. Klimov 2019-04-01 15:06:17 +02:00
parent 3a6caa2800
commit 64b2ac4b30
2 changed files with 0 additions and 19 deletions

View 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)

View 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};