[Python-bugs-list] [ python-Bugs-731644 ] GIL not released around getaddrinfo()

SourceForge.net noreply@sourceforge.net
Sat, 03 May 2003 03:09:43 -0700


Bugs item #731644, was opened at 2003-05-03 01:23
Message generated for change (Comment added) made by jvr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=731644&group_id=5470

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Just van Rossum (jvr)
Assigned to: Nobody/Anonymous (nobody)
Summary: GIL not released around getaddrinfo()

Initial Comment:
I have a situation where sock.connect() blocks in getaddrinfo(), but 
since the GIL isn't released around getaddrinfo() calls, other threads 
also block.

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

>Comment By: Just van Rossum (jvr)
Date: 2003-05-03 12:09

Message:
Logged In: YES 
user_id=92689

Isn't that an orthogonal issue? In that we should then use a lock for 
getaddrinfo(), yet do release the GIL.

I find it unacceptable that my GUI main thread can hang for several seconds 
(or more) just by doing a sock.connect() in a different thread.

Short of that, can we find out on _which_ platforms getaddrinfo() isn't 
thread-safe and work around that?

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

Comment By: Martin v. Löwis (loewis)
Date: 2003-05-03 11:03

Message:
Logged In: YES 
user_id=21627

This is not a bug. getaddrinfo isn't thread-safe on some
systems, so we must protect it from multiple access.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=731644&group_id=5470