GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — os.listdir inconsistenly releases the GIL on win32 · Issue #51164 · python/cpython

os.listdir inconsistenly releases the GIL on win32 #51164

New issue
Copy link
New issue
Copy link
Closed
Closed
os.listdir inconsistenly releases the GIL on win32#51164
Copy link
Assignees
pitrou
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

rfk
mannequin
opened on Sep 15, 2009
Issue body actions
BPO 6915
Nosy @loewis, @pitrou
Files
  • listdir_gil.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 = 'https://github.com/pitrou'
    closed_at = <Date 2010-08-10.00:04:32.716>
    created_at = <Date 2009-09-15.04:43:13.840>
    labels = ['type-bug', 'library']
    title = 'os.listdir inconsistenly releases the GIL on win32'
    updated_at = <Date 2010-08-10.00:04:32.714>
    user = 'https://bugs.python.org/rfk'

    bugs.python.org fields:

    activity = <Date 2010-08-10.00:04:32.714>
    actor = 'pitrou'
    assignee = 'pitrou'
    closed = True
    closed_date = <Date 2010-08-10.00:04:32.716>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2009-09-15.04:43:13.840>
    creator = 'rfk'
    dependencies = []
    files = ['14892']
    hgrepos = []
    issue_num = 6915
    keywords = ['patch']
    message_count = 2.0
    messages = ['92643', '113500']
    nosy_count = 3.0
    nosy_names = ['loewis', 'pitrou', 'rfk']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6915'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    Activity

    1. rfk commented on Sep 15, 2009

      @rfk
      rfkmannequin
      on Sep 15, 2009
      MannequinAuthor
      More actions

      The win32 implementation of os.listdir() releases the GIL around calls
      to FindNextFile, but not around calls to FindFirstFile. Attached is a
      simple patch to consistently release the GIL around any such calls.

    2. rfk
      added
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Sep 15, 2009
    3. birkenfeld
      assigned
      loewis
      on Sep 17, 2009
    4. BreamoreBoy
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Jul 11, 2010
    5. birkenfeld
      assigned
      pitrou
      and unassigned
      loewis
      on Aug 2, 2010
    6. pitrou commented on Aug 10, 2010

      @pitrou
      pitrou
      on Aug 10, 2010
      Member
      More actions

      The original patch also modifies attributes_from_dir() and attributes_from_dir_w(), but these are called with the GIL released.
      Modified patch committed in r83921 (py3k), r83922 (3.1) and r83923 (2.7). Thank you!

    7. pitrou
      closed this as completedon Aug 10, 2010
    8. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @pitrou
      pitrou

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.