Message2325
I have an application which I am required to embedd a python interpreter inside of a C++ application. The python script creates a separate thread of control to handle a TCP/IP socket connection. The thread can send data just find but hangs on the socket 'recv' fnction.
After a dya of debugging my code I went into the python socketmodule.c and at line 1082 I commented out the thread protection code:
/*Py_BEGIN_ALLOW_THREADS*/
n = recv(s->sock_fd, PyString_AsString(buf), len, flags);
/*Py_END_ALLOW_THREADS*/
I then recompiled the python library and then recompiled my C++ app and everything worked just fine.
The problem does not exist when I run the script alone using the python interpreter. Only when I embedd the interpreter, so this is some sort of configuration issue.
David Schere
Email: david_schere@yahoo.com
|
|
Date |
User |
Action |
Args |
2007-08-23 13:52:04 | admin | link | issue221327 messages |
2007-08-23 13:52:04 | admin | create | |
|