ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
C++ Binding with Threads
by Pablo Yabo other posts by this author
Aug 13 2007 12:32PM messages near this date
Re: Python in Chinese | C++ Binding with Threads
Hello,

I want to embed Python in an application and use an API of the application
from Python.
The application uses a library that creates several threads and I the users
of the application will write Python scripts handling this events.

The problem is that I having problems with threads. I saw that I have to
PyEval_InitThreads and then PyThreadState_New and PyThreadState_Swap from
the new thread but this way to solve the problem doesn't work for me because
I need to let 2 or more threads run at the SAME time.
The interpreter lock doesn't let them run at the same time so I'm looking
for another solution. I saw Py_NewInterpreter and I tried to use it but it
doesn't work if I don't keep the lock.

Can anyone help me to solve this issue or tell me 'Forget it!'?


Thanks on advance,
Pablo Yabo
Thread:
Pablo Yabo
Pablo Yabo

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved