In Boost 1.57 f_context
& make_fcontext
looks like this
// fcontext.hpp:
typedef void* fcontext_t;
fcontext_t BOOST_CONTEXT_CALLDECL make_fcontext( void * sp, std::size_t size, void (* fn)( intptr_t) );
make_fcontext()
?I have read the docs, asked on IRC and looked at the examples, but could not find anything. Is there a need to release/delete/close this resource?
For users, fcontext_t
is a handle to identify context, and specify which context to jump to with jump_fcontext()
. The object pointed to by the opaque pointer returned from make_fcontext(stack, context_function)
will be managed by the provided stack. The documentation states:
Creates an
fcontext_t
on top of the stack [...]
One can also look into the Boost.Coroutine's implementation to see its usage of fcontext_t
.