4 ms·
Cohabitation with Python and C++
- swah 15y agoWhen you say HTTP API, does that mean you had C++ http server, C++ http client, Python http server and Python http client?
- benhoyt 15y agoGood question: In this case C++ was the server, and Python (via urllib2) was the client.
- ephelon 15y agoIt's quite easy to release the GIL while you are running non-python code.[1] Just be sure that if you touch the Python API that you reaquire the GIL.[2] [1] http://docs.python.org/c-api/init.html#releasing-the-gil-from-extension-code http://docs.python.org/c-api/init.html#releasing-the-gil-fro... [2] http://docs.python.org/c-api/init.html#PyGILState_Ensure http://docs.python.org/c-api/init.html#PyGILState_Ensure