Python - C api related - Concurrent Script Execution

Silver Interactive silverinteract at gmail.com
Fri Aug 5 05:29:07 EDT 2011


Dear All,

I have developed a C++ server application which handles requests coming in
from my web server. The server application is capable of handling multiple
users at a time. Each user has a session object. Each user also has some
variables associated with it. These variables are maintained in the c++ side
as python dictionaries as they will be processed by executing scripts by the
function PyRun_SimpleString() with each request. What i realised half-way
through the implementation is that I will probably not be able to execute
python scripts in parallel from the c++ end. Is this thinking correct? One
user makes a request and the c++ code calls the python script which has to
fetch information from a remote server (takes some seconds), but I cannot
have other users script execution wait till this first script returns. Am i
missing a point here. Please let me know if there is a way out of this as I
am stuck big time.

Do let me know if you require any more information.

Help will be appreciated. Thanks!!!

Regards
Diana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110805/a2a12555/attachment.html>


More information about the Python-list mailing list