File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
include/boost/http/server Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 1212
1313#include < boost/http/detail/config.hpp>
1414#include < boost/http/server/router_types.hpp>
15+ #include < boost/capy/affine.hpp>
1516#include < boost/capy/datastore.hpp>
16- #include < boost/capy/executor.hpp>
1717#include < boost/capy/task.hpp>
1818#include < boost/http/request.hpp> // VFALCO forward declare?
1919#include < boost/http/request_parser.hpp> // VFALCO forward declare?
@@ -84,7 +84,7 @@ struct BOOST_HTTP_SYMBOL_VISIBLE
8484
8585 /* * Executor associated with the session.
8686 */
87- capy::executor ex;
87+ capy::any_dispatcher ex;
8888
8989 /* * Destructor
9090 */
Original file line number Diff line number Diff line change 99
1010#include < boost/http/server/route_handler.hpp>
1111#include < boost/http/string_body.hpp>
12+ #include < boost/capy/async_run.hpp>
1213
1314namespace boost {
1415namespace http {
@@ -49,8 +50,6 @@ set_body(std::string s)
4950 return *this ;
5051}
5152
52- #ifdef BOOST_HTTP_HAS_CORO
53-
5453auto
5554route_params::
5655spawn (
@@ -60,19 +59,17 @@ spawn(
6059 return this ->suspend (
6160 [ex = this ->ex , t = std::move (t)](resumer resume) mutable
6261 {
63- capy::spawn (ex, std::move (t),
64- [resume](system::result<
65- route_result, std::exception_ptr> r)
62+ capy::async_run (ex)(std::move (t),
63+ [resume](route_result rv)
64+ {
65+ resume (rv);
66+ },
67+ [resume](std::exception_ptr ep)
6668 {
67- if (r.has_error ())
68- resume (r.error ());
69- else
70- resume (*r);
69+ resume (ep);
7170 });
7271 });
7372}
7473
75- #endif
76-
7774} // http
7875} // boost
You can’t perform that action at this time.
0 commit comments