Skip to content

Add api PyGILState_Check #61724

Closed
Closed

Description

@kristjanvalur
BPO 17522
Nosy @brettcannon, @pitrou, @kristjanvalur
Files
  • gilcheck.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-04-04.11:46:41.795>
    created_at = <Date 2013-03-22.17:04:10.653>
    labels = ['interpreter-core', 'type-feature']
    title = 'Add api PyGILState_Check'
    updated_at = <Date 2014-04-04.12:02:15.137>
    user = 'https://github.com/kristjanvalur'

    bugs.python.org fields:

    activity = <Date 2014-04-04.12:02:15.137>
    actor = 'kristjan.jonsson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-04-04.11:46:41.795>
    closer = 'kristjan.jonsson'
    components = ['Interpreter Core']
    creation = <Date 2013-03-22.17:04:10.653>
    creator = 'kristjan.jonsson'
    dependencies = []
    files = ['29547']
    hgrepos = []
    issue_num = 17522
    keywords = ['patch']
    message_count = 8.0
    messages = ['184985', '185002', '185013', '185029', '185032', '185033', '185034', '185035']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'pitrou', 'kristjan.jonsson', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17522'
    versions = ['Python 3.4']

    Activity

    1. kristjanvalur commented on Mar 22, 2013

      kristjanvalurmannequin
      MannequinAuthor

      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.

    2. brettcannon commented on Mar 22, 2013

      @brettcannon
      Member

      Seems fine to me

    3. pitrou commented on Mar 22, 2013

      @pitrou
      Member

      You probably want to add some docs to c-api/init.rst.

    4. kristjanvalur commented on Mar 23, 2013

      kristjanvalurmannequin
      MannequinAuthor

      Sure, thanks.

    5. python-dev commented on Mar 23, 2013

      python-devmannequin
      Mannequin

      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

    6. pitrou commented on Mar 23, 2013

      @pitrou
      Member

      A small detail: you should add a "versionadded" tag in the function doc.

    7. python-dev commented on Mar 23, 2013

      python-devmannequin
      Mannequin

      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

    8. kristjanvalur commented on Mar 23, 2013

      kristjanvalurmannequin
      MannequinAuthor

      Thanks, Antoine.

    9. transferred this issue fromon Apr 10, 2022
    10. kristjanvalur commented on Mar 17, 2025

      @kristjanvalur
      ContributorAuthor

      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.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions