boost::context "main" stack
Hello, is there some way to temporarily run a function on the main stack? I played around a bit, but failed ultimately since the first stub function to be called is getting a "null" context which I assume to be only a valid "return-context". We're facing a problem where a dialog run modally inside a context runs webkit, which triggers garbage collection, which fails miserably since it assumes we're on the "native" stack. If it were possible to run something "on-top" of the main stack, this could maybe be circumvented. Thank you, Michael
On Mon, Sep 19, 2016 at 11:21 AM, Michael Steinberg
Hello,
is there some way to temporarily run a function on the main stack? I played around a bit, but failed ultimately since the first stub function to be called is getting a "null" context which I assume to be only a valid "return-context".
We're facing a problem where a dialog run modally inside a context runs webkit, which triggers garbage collection, which fails miserably since it assumes we're on the "native" stack. If it were possible to run something "on-top" of the main stack, this could maybe be circumvented.
Thank you, Michael
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I have a similar problem I solved by providing a mechanism for storing the
"root" context. Storing this is a bit tricky, since the context you're
jumping to is responsible for performing your action (assuming you're using
Context v2). My own fiber implementation provides the ability to jump to
yield, wait and jump to root. Hopefully this is helpful for you.
struct destination_action
{
enum class goal { root, ready, wait };
goal request;
void* addr = nullptr;
};
using context = boost::context::execution_context
participants (2)
-
Michael Steinberg
-
Travis Gockel