[ python-Bugs-1432525 ] os.listdir doesn't release GIL
SourceForge.net
noreply at sourceforge.net
Tue Mar 7 22:09:48 CET 2006
Bugs item #1432525, was opened at 2006-02-15 17:45
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1432525&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
>Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Jonathan Ellis (ellisj)
Assigned to: Georg Brandl (gbrandl)
Summary: os.listdir doesn't release GIL
Initial Comment:
posix_listdir in posixmodule.c does not release the
global interpreter lock, blocking all other threads for
the duration of the call.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2006-03-07 16:09
Message:
Logged In: YES
user_id=6380
So the patch is broken because there's a continue in the
do-while-loop that jumps to the "while (result)" test
without setting result.
Fixing this by adding a label and a goto (in two places!)
creates awful spaghetti code.
Before somebody spends more time refactoring such hairy
code, I'd like to see a better motivation; the motivation
currently provided is a bit thin. Are there use cases where
this call takes a long time?
----------------------------------------------------------------------
Comment By: Georg Brandl (gbrandl)
Date: 2006-03-07 07:48
Message:
Logged In: YES
user_id=849994
Committed as rev. 42884.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-03-03 12:48
Message:
Logged In: YES
user_id=21627
The patch looks fine. Please apply.
----------------------------------------------------------------------
Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-18 06:13
Message:
Logged In: YES
user_id=1188172
Attaching a patch. Please check.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1432525&group_id=5470
More information about the Python-bugs-list
mailing list