I am using Boost Python to expose a function that holds an internal thread, the class has start and stop functions that only control an internal loop. The code for MyClass is:
I use the draft module in jupyter as follows attached
The first run causes a crash as in
The second run is not throwing but produces nothing. Could you please help me make this work.
UPDATE
I figured a partial source of the problem, this line boost::python::call is what is causing issues, wondering if it's a memory thing when copying const boost::python::object& op. Still stuck on how to make to the above work though.
I am using Boost Python to expose a function that holds an internal thread, the class has
start
andstop
functions that only control an internal loop. The code forMyClass
is:I then create a helper function to pass a callback as:
I then create my module:
I use the
draft
module in jupyter as follows attachedThe first run causes a crash as in
The second run is not throwing but produces nothing. Could you please help me make this work.
UPDATE I figured a partial source of the problem, this line
boost::python::call
is what is causing issues, wondering if it's a memory thing when copyingconst boost::python::object& op
. Still stuck on how to make to the above work though.