Skip to content

gh-117514: Add sys._is_gil_enabled() function#118514

Merged
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-117514-sys-is_gil_enabled
May 3, 2024
Merged

gh-117514: Add sys._is_gil_enabled() function#118514
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-117514-sys-is_gil_enabled

Conversation

@colesbury

@colesbury colesbury commented May 2, 2024

Copy link
Copy Markdown
Contributor

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.


📚 Documentation preview 📚: https://cpython-previews--118514.org.readthedocs.build/

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.
Comment thread Lib/test/test_sys.py
@colesbury colesbury merged commit 2dae505 into python:main May 3, 2024
@colesbury colesbury deleted the gh-117514-sys-is_gil_enabled branch May 3, 2024 15:10
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants