From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Tue, 26 Jan 2016 23:05:38 +0100 Message-ID: <56A7EDB2.40109@redhat.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1453845969 22733 80.91.229.3 (26 Jan 2016 22:06:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 22:06:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 26 23:06:05 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aOBkM-0004hU-Gq for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 23:05:58 +0100 Original-Received: from localhost ([::1]:47128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOBkL-0003Bd-Qg for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 17:05:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOBk9-0003BN-Le for emacs-devel@gnu.org; Tue, 26 Jan 2016 17:05:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOBk6-00080v-B8 for emacs-devel@gnu.org; Tue, 26 Jan 2016 17:05:45 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:48115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOBk6-00080V-5T for emacs-devel@gnu.org; Tue, 26 Jan 2016 17:05:42 -0500 Original-Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 5B3963719AD for ; Tue, 26 Jan 2016 22:05:41 +0000 (UTC) Original-Received: from oldenburg.str.redhat.com (ovpn-204-20.brq.redhat.com [10.40.204.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0QM5cUL000872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Jan 2016 17:05:40 -0500 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198884 Archived-At: On 01/23/2016 02:50 PM, Lars Magne Ingebrigtsen wrote: > 2) Use one of the newer async C resolver libraries. This would not be > available on all platforms, and would be Yet Another Dependency which > I'm sure everybody would rather that we avoid. The internal NSS (Name Service Switch) API is not asynchronous, so a fully backwards-compatible asynchronous name resolution library simply cannot exist. The so-called asynchronous getaddrinfo variant just uses threads under the covers, too. You could use threads or a co-process, though. It's not too hard to implement as long as you don't have to care about head-of-line blocking. You could even a subshell invoking =93getent ahosts=94 and parse the res= ult. Florian