I am writing an HTTP server. I have written the following and it works well:
boost::asio::io_context io_context;
tcp::acceptor acceptor(io_context, ...);
acceptor.async_accept(...);
auto server_thread = std::jthread([] { io_context.run(); });
// How do I ensure the server is ready?
After the following is being run – is there a way to ensure the server is up and running?