How to call a multi-threaded C function in Cython?

百般思念 提交于 2019-12-23 13:27:26

问题


I have a question about how to call a multi-threaded C function in Cython.

Do I need to release/acquire the GIL before/after I do the multi-threaded stuff in the C function?

Or can I just use it like a normal C function?

Should I follow the directions here for general Python extensions?


回答1:


You should have looked down a few sections.

http://docs.python.org/c-api/init.html#non-python-created-threads



来源:https://stackoverflow.com/questions/11687960/how-to-call-a-multi-threaded-c-function-in-cython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!