Bugs item #1432525, was opened at 2006-02-15 22:45
Message generated for change (Comment added) made by ellisj
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: Jonathan Ellis (ellisj)
Date: 2006-03-07 22:36

Message:
Logged In: YES 
user_id=657828

My original use case is on a server back end with fairly
busy disks.  It's not unusual for listdir to take 100ms. 
That's a relatively long time to shut down the rest of the
system.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2006-03-07 21: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 12:48

Message:
Logged In: YES 
user_id=849994

Committed as rev. 42884.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-03-03 17:48

Message:
Logged In: YES 
user_id=21627

The patch looks fine. Please apply.

----------------------------------------------------------------------

Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-18 11: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
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to