Cython nogil
suggest changeCython is a compiler for a Python-like language. It uses the GIL, but lets you disable it. See their documentation
As an example, using the code that David Beazley first used to show the dangers of threads against the GIL, we’ll rewrite it using nogil:
David Beazley’s code that showed GIL threading problems
Re-written using nogil (ONLY WORKS IN CYTHON):
The rewritten nogil sample is not on this page. The documentation says you must make sure not to change any Python objects:
Code in the body of the statement must not manipulate Python objects in any way, and must not call anything that manipulates Python objects without first re-acquiring the GIL. Cython currently does not check this.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents