Embedding Python in Multi-threading App. Any Guidelines, Hints, Recipes ??
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

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

From: <adsheehan@eircom.net>
Date: Tue Jun 07 2005 - 17:12:06 CEST

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
Received on Thu Sep 29 16:21:43 2005