}
}
-/**
- * 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)
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};