mirror of
https://github.com/python/cpython
synced 2026-09-26 16:21:04 +03:00
The function returns `True` or `False` depending on whether the GIL is currently enabled. In the default build, it always returns `True` because the GIL is always enabled.
4 lines
240 B
ReStructuredText
4 lines
240 B
ReStructuredText
Add ``sys._is_gil_enabled()`` function that returns whether the GIL is
|
|
currently enabled. In the default build it always returns ``True`` because
|
|
the GIL is always enabled. In the free-threaded build, it may return
|
|
``True`` or ``False``.
|