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

2019-06-24 03:12发布

问题:

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