On 06/06/2010 06:51 PM, Embhi Karuche wrote:
I have a vector whose contents I would like to copy
into a python::str.
Currently, I am doing:
string temp(myvector.begin(), myvector.end());
python::str data(temp);
How can I skip the intermediate copy?
You'll need to use the regular Python C A
you can only access python from 1 thread at a time. I have not done any
messing around with python types so I do not know if those require the gil
but from what you said it seems like they may.
In order to work with python from multiple threads you need to manage the
gil in your app. Just do a sear
I have a vector whose contents I would like to copy
into a python::str.
Currently, I am doing:
string temp(myvector.begin(), myvector.end());
python::str data(temp);
How can I skip the intermediate copy?
Thanks
___
Cplusplus-sig mailing list
Cplusplus-
>No you can do this, I do the same thing in my project.
>However, without appropriate GIL locks your new thread cannot call into
>python. So make sure your new thread of not calling any python callables
>and you are fine.
In my worker thread (ie, the workCallback() which is invoked by the
doHeavy
No you can do this, I do the same thing in my project.
However, without appropriate GIL locks your new thread cannot call into
python. So make sure your new thread of not calling any python callables
and you are fine.
On Sun, Jun 6, 2010 at 2:30 PM, Embhi Karuche wrote:
> Hello
>
> I have read t
Hello
I have read the FAQ ( http://bit.ly/dl8j8o ) about
multi-threading/multi-interpretor support - but I don't quite
understand it. Please help me get clarified with it.
Suppose I have exposed a C++ class's member function using
Boost.Python. This function internally starts a Boost.Thread. Is th