Title: os.listdir inconsistenly releases the GIL on win32
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pitrou Nosy List: loewis, pitrou, rfk
Priority: normal Keywords: patch

Created on 2009-09-15 04:43 by rfk, last changed 2010-08-10 00:04 by pitrou. This issue is now closed.

File name Uploaded Description Edit
listdir_gil.patch rfk, 2009-09-15 04:43
Messages (2)
msg92643 - (view) Author: Ryan Kelly (rfk) Date: 2009-09-15 04:43
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.
msg113500 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-08-10 00:04
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!
Date User Action Args
2010-08-10 00:04:32pitrousetstatus: open -> closed
resolution: fixed
messages: + msg113500

stage: patch review -> resolved
2010-08-02 20:48:31georg.brandlsetassignee: loewis -> pitrou

nosy: + pitrou
2010-07-11 09:38:32BreamoreBoysetstage: patch review
components: + Library (Lib), - None
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2009-09-17 07:51:18georg.brandlsetassignee: loewis

nosy: + loewis
2009-09-15 04:43:14rfkcreate