File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414#include < utility>
1515#include < vector>
1616#include < stdexcept>
17+ #include < boost/context/fixedsize_stack.hpp>
1718#include < boost/exception/all.hpp>
1819#include < boost/asio/deadline_timer.hpp>
1920#include < boost/asio/io_context.hpp>
@@ -100,6 +101,10 @@ class IoEngine
100101 static void SpawnCoroutine (Handler& h, Function f) {
101102
102103 boost::asio::spawn (h,
104+ #if BOOST_VERSION >= 108700
105+ std::allocator_arg_t (),
106+ boost::context::fixedsize_stack (GetCoroutineStackSize ()),
107+ #endif // BOOST_VERSION >= 108700
103108 [f](boost::asio::yield_context yc) {
104109
105110 try {
@@ -116,8 +121,10 @@ class IoEngine
116121 // https://github.com/boostorg/coroutine/issues/39
117122 throw ;
118123 }
119- },
120- boost::coroutines::attributes (GetCoroutineStackSize ()) // Set a pre-defined stack size.
124+ }
125+ #if BOOST_VERSION < 108700
126+ , boost::coroutines::attributes (GetCoroutineStackSize ()) // Set a pre-defined stack size.
127+ #endif // BOOST_VERSION < 108700
121128 );
122129 }
123130
You can’t perform that action at this time.
0 commit comments