[Patches] [ python-Patches-604210 ] release GIL around getaddrinfo()
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 04 Sep 2002 12:20:44 -0700
Patches item #604210, was opened at 2002-09-03 21:48
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=604210&group_id=5470
Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Jeremy Hylton (jhylton)
Summary: release GIL around getaddrinfo()
Initial Comment:
If getaddrinfo() is thread-safe, then we should release
the interpreter lock before calling it. There is every
reason to believe that this operation will be slow.
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2002-09-04 19:20
Message:
Logged In: YES
user_id=31392
The getaddrinfo() on Linux says it thread-safe. It's a
name-fangled call. Is it part of some standard? It would
certainly be possible to make the fallback implementation
thread-safe. Or, if we don't believe it is thread-safe, we
could add a separate lock to protect it. The socket module
of 2.1 vintage had a separate lock for this purpose. And
the 2.1 vintage Python performs much better when a
multi-threaded app does DNS lookups.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-09-04 06:25
Message:
Logged In: YES
user_id=21627
How do you know getaddrinfo is thread-safe? In particular,
when using the getaddrinfo emulation, it is not.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=604210&group_id=5470