You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a function that is used by specialized part of our code. Often it is useful for e.g. IO callbacks or memory hooks to know if the GIL is in place in order to know if certain things can be done or not.
Putting this here to see if anyone has strong opinions against adding this.
Btw, this was a "PR" (at the time such things didn't exist) of a very useful feature. We were doing overlapped IO on windows where an IO completion callback would arrive on any thread. I forget the details, but it was useful to know if we could submit the IO right away, or would enqueue it to be processed by another thread who could. Latency was king in the Eve Online network stack.
Activity
kristjanvalur commentedon Mar 22, 2013
Here is a function that is used by specialized part of our code. Often it is useful for e.g. IO callbacks or memory hooks to know if the GIL is in place in order to know if certain things can be done or not.
Putting this here to see if anyone has strong opinions against adding this.
brettcannon commentedon Mar 22, 2013
Seems fine to me
pitrou commentedon Mar 22, 2013
You probably want to add some docs to c-api/init.rst.
kristjanvalur commentedon Mar 23, 2013
Sure, thanks.
python-dev commentedon Mar 23, 2013
New changeset 2e92d1567ad7 by Kristján Valur Jónsson in branch 'default':
Issue bpo-17522: Add the PyGILState_Check() API.
http://hg.python.org/cpython/rev/2e92d1567ad7
pitrou commentedon Mar 23, 2013
A small detail: you should add a "versionadded" tag in the function doc.
python-dev commentedon Mar 23, 2013
New changeset 772d57aac162 by Kristján Valur Jónsson in branch 'default':
Issue bpo-17522: Minor documentation fix
http://hg.python.org/cpython/rev/772d57aac162
kristjanvalur commentedon Mar 23, 2013
Thanks, Antoine.
kristjanvalur commentedon Mar 17, 2025
Btw, this was a "PR" (at the time such things didn't exist) of a very useful feature. We were doing overlapped IO on windows where an IO completion callback would arrive on any thread. I forget the details, but it was useful to know if we could submit the IO right away, or would enqueue it to be processed by another thread who could. Latency was king in the Eve Online network stack.