Embedding Python in Multi-threading App. Any Guidelines, Hints, Recipes ??

A

adsheehan

Hi,

I am embedding Python into a multi-threaded application running on
Solaris. Python will enable end users to customize and re-program many
aspects of the application.

I expect that the C++ application will be natively multi-threaded and
will embed multiple Python sub-interpreters. Called Python scripts may
in turn call back into the C++ application via SWIG wrappers of C++
objects.

I need advice and/or pointers to relevant documentation on the subject
if available please.

In particular, I need advice on the necessary housekeeping (set/reset
of GIL, PyThreadStates, PyInterpreterStates etc etc) to invoke a
sub-interpreter from a native thread. A native thread may call a number
of sub-interpreters in sequence or recursively (due to call backs) and
I cannot find specific information on this subject area.

Many thanks in advance.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top