[问题] Multithread C++ call Python

楼主: DicYang (寂屋出租)   2014-07-11 17:41:35
大家好~
请问大家C++可以实现multi-thread下去调用Python吗?
并且每个thread都是asynchronous的执行状态...
不好意思小弟不知道该下什么关键用去google...所以就直接上来问了....
感谢
作者: CaptainH (Cannon)   2014-07-11 17:56:00
你是想问 multithread 还是想问 call python ?
楼主: DicYang (寂屋出租)   2014-07-11 20:48:00
multthread去call python
作者: damody (天亮damody)   2014-07-11 21:57:00
可以。
作者: LiloHuang (十年一刻)   2014-07-12 13:19:00
如果是要从 C++ 来呼叫 Python C API 要多注意 GIL 状态可参阅 https://docs.python.org/2/c-api/init.html

Links booklink

Contact Us: admin [ a t ] ucptt.com