I edited the post so many times I forgot the subject line! I am a bad
person.
Maybe the most condensed question here is: How do you normally manage
multiple resources competing with the GIL in a way that could cause
deadlocks with it? For the details, see the long post.
On Thu, Mar 15, 2012 at
I discovered recently that during callbacks to Python objects, sometimes
the interpreter would try to do stuff at the same time, despite the fact I
made a call to ensure the GIL. I read the solution for that kind of thing
I'm doing is calling PyEval_InitThreads(). This worked at first, but like
m
Hello
The situation is as follow.
I have a C++ code that I haven't written and that I barely can modified. I am
supposed to reflect this code in Python with boost.
In the code, I have something looking like this:
Class A_Base {
A_Base(){};
~A_Base(){};
Whatever virtual and pure virtual fu
I have used this myself for some time.
Here is an example:
typedef boost::mt19937 rng_t;
struct mt_pickle_suite : bp::pickle_suite {
static bp::object getstate (const rng_t& rng) {
std::ostringstream os;
boost::archive::binary_oarchive oa(os);
oa << rng;
return bp::str (os.