Chances are that your application may be using multithreaded code. Python is not considered suitable for multithreaded code because of the Global Interpreter Lock (GIL). The good news is that, in Cython, you can explicitly unlock the GIL and make your code truly multithreaded. This is done by simply putting a statement with nogil:
in your code. You can later acquire the GIL using with gil
in your code:
with nogil: <The code block here> function_name(args) with gil: <function body>
3.147.27.171