[C++-sig] multithreading and interpreters

Matthew Scouten (TT) Matthew.Scouten at tradingtechnologies.com
Tue Nov 24 16:11:36 CET 2009


I'm sorry, I meant massively *patched* BP

-----Original Message-----
From:
cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at python.org
[mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at py
thon.org] On Behalf Of Matthew Scouten (TT)
Sent: Tuesday, November 24, 2009 8:58 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] multithreading and interpreters

Multiple threads is do-able, but you have to manage the GIL manually.
Multiple interpreters is more difficult. I think that it has been done
before by someone who massively BP, but I have never tried it. 

-----Original Message-----
From:
cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at python.org
[mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at py
thon.org] On Behalf Of Trigve Siver
Sent: Sunday, November 22, 2009 10:56 AM
To: cplusplus-sig at python.org
Subject: [C++-sig] multithreading and interpreters

Hi,
I'm working on project where we used boost.python (embedded).

In general I have the "modules" where each module is something like
sandbox, is
isolated from others modules and run in solo thread. I want to be able
to use 
python (and boost python functions of course) from each module thread.
Something
like that each thread could have own interpreter without need to take
care of GIL and
like. Is it possible? I know there could be some problems with GIL and
so. I've found in 
python C API docs Py_NewInterpreter() function which could be of help
(or not?).

So will this configuration work? Could be there some problems with
boost.python
when using multiple threads?

Thanks

Trigve



      
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig at python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig at python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig


More information about the Cplusplus-sig mailing list