examples & tests use context instead of coroutine.

This commit is contained in:
Klemens authored and Klemens Morgenstern committed 2023-02-02 23:27:49 +08:00
1 parent 1841a592d6
commit 99bceb5bff
24 files changed
+156 -37

No files matched your search

+1 -1
View File
@@ -12,5 +12,5 @@ exe websocket-server-fast :
:
<variant>coverage:<build>no
<variant>ubasan:<build>no
<library>/boost/coroutine//boost_coroutine
<library>/boost/context//boost_context
;
@@ -30,6 +30,7 @@
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/asio/detached.hpp>
#include <boost/asio/spawn.hpp>
#include <boost/asio/strand.hpp>
#include <algorithm>
@@ -411,7 +412,7 @@ do_coro_listen(
&do_coro_session,
websocket::stream<
beast::tcp_stream>(std::move(socket)),
std::placeholders::_1));
std::placeholders::_1), boost::asio::detached);
}
}
@@ -463,7 +464,7 @@ int main(int argc, char* argv[])
tcp::endpoint{
address,
static_cast<unsigned short>(port + 2u)},
std::placeholders::_1));
std::placeholders::_1), boost::asio::detached);
// Run the I/O service on the requested number of threads
std::vector<std::thread> v;