6 #include <boost/version.hpp> 8 #define BOOST_COROUTINES_NO_DEPRECATION_WARNING // Boost 1.61 9 #define BOOST_COROUTINE_NO_DEPRECATION_WARNING // Boost 1.62 11 #if BOOST_VERSION >= 106800 12 #include <boost/context/continuation_fcontext.hpp> 14 #include <boost/context/all.hpp> 17 #if BOOST_VERSION >= 106100 18 #include <boost/coroutine/stack_allocator.hpp> 19 namespace bc = boost::context::detail;
20 namespace bco = boost::coroutines;
23 # include <boost/coroutine/stack_context.hpp> 24 namespace bc = boost::context;
25 namespace bco = boost::coroutines;
27 # include <boost/assert.hpp> 28 # include <boost/coroutine/protected_stack_allocator.hpp> 31 # include <boost/coroutine/stack_allocator.hpp> 35 #endif // BOOST_VERSION >= 106100 51 #if BOOST_VERSION >= 106100 73 alloc.allocate(stack_ctx, stack_size);
74 my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf);
169 i->prom->set_exception( std::make_shared<timeout_exception>() );
174 i->prom->set_exception( e );
blocked_promise(promise_base *p=0, bool r=true)
fc::context * next_blocked
stack_allocator * stack_alloc
uint64_t context_posted_num
void add_blocking_promise(promise_base *p, bool req=true)
#define FC_CONTEXT_STACK_SIZE
void timeout_blocking_promises()
void(*)(intptr_t) context_fn
const char * cancellation_reason
void set_exception_on_blocking_promises(const exception_ptr &e)
bool try_unblock(promise_base *p)
std::shared_ptr< exception > exception_ptr
void clear_blocking_promises()
bc::fcontext_t my_context
fc::context * next_blocked_mutex
bco::protected_stack_allocator stack_allocator
Defines exception's used by fc.
void remove_blocking_promise(promise_base *p)
std::vector< blocked_promise > blocking_prom
fc::context * caller_context
bco::stack_context stack_ctx
context(context_fn sf, stack_allocator &alloc, fc::thread *t)