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
{{ message }}
Repository navigation
os.listdir inconsistenly releases the GIL on win32 #51164
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=<Date2010-08-10.00:04:32.716>created_at=<Date2009-09-15.04:43:13.840>labels= ['type-bug', 'library']
title='os.listdir inconsistenly releases the GIL on win32'updated_at=<Date2010-08-10.00:04:32.714>user='https://bugs.python.org/rfk'
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.
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!
Activity
rfk commentedon Sep 15, 2009
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.
pitrou commentedon Aug 10, 2010
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!