Re: [C++-sig] [Py++] C++ containers and Python sequences

2010-02-02 Thread Roman Yakovenko
On Tue, Feb 2, 2010 at 5:53 PM, peoro wrote: > Hello, > let me start by thanking everybody who's behind Boost.Python and Py++, > these projects are really awesome. > > I read that Py++ (and/or Boost.Python) has a native support for some > C++ containers, and that others can be added using indexing

Re: [C++-sig] PyGILState_Release with multithread

2010-02-02 Thread Renato Araujo
Remember of use PyEval_InitThreads on your module initialization. Renato Araujo Oliveira Filho On Tue, Feb 2, 2010 at 2:30 PM, Matthew Scouten (TT) < matthew.scou...@tradingtechnologies.com> wrote: > First of all, the PyGILState_* functions are acquiring and releasing the > “Global Interprete

Re: [C++-sig] PyGILState_Release with multithread

2010-02-02 Thread Matthew Scouten (TT)
First of all, the PyGILState_* functions are acquiring and releasing the "Global Interpreter _Lock_" Your _pyMutex is redundant. Here are the rules that govern the GIL: 1) Only one thread at a time can hold the GIL 2) Any thread that is touching python data, python code, or any part

[C++-sig] [Py++] C++ containers and Python sequences

2010-02-02 Thread peoro
Hello, let me start by thanking everybody who's behind Boost.Python and Py++, these projects are really awesome. I read that Py++ (and/or Boost.Python) has a native support for some C++ containers, and that others can be added using indexing suites [ http://www.language-binding.net/pyplusplus/docu

[C++-sig] PyGILState_Release with multithread

2010-02-02 Thread Pascal Briet
Hello, After a few days of headache, I think the best way is to share this problematicÂ… I have : - a main Python script - a C module imported and called from Python (thanks to boost ::python) - A dozen of threads created by a C function (boost ::thread) - These threads, in a C main lo