Multithreaded code

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> 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.27.171