From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Async DNS lookups Date: Tue, 02 Nov 2010 12:47:36 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288723423 8497 80.91.229.12 (2 Nov 2010 18:43:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Nov 2010 18:43:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 02 19:43:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PDLpZ-00065P-1g for ged-emacs-devel@m.gmane.org; Tue, 02 Nov 2010 19:43:37 +0100 Original-Received: from localhost ([127.0.0.1]:33765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDLpY-0004W8-4G for ged-emacs-devel@m.gmane.org; Tue, 02 Nov 2010 14:43:36 -0400 Original-Received: from [140.186.70.92] (port=34357 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDLpQ-0004VJ-Fe for emacs-devel@gnu.org; Tue, 02 Nov 2010 14:43:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDLpN-00039F-2U for emacs-devel@gnu.org; Tue, 02 Nov 2010 14:43:28 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:26996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDLpM-00038q-RI for emacs-devel@gnu.org; Tue, 02 Nov 2010 14:43:25 -0400 Original-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA2IhNCd020029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Nov 2010 14:43:23 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oA2IhMoO015847 for ; Tue, 2 Nov 2010 14:43:22 -0400 Original-Received: from parfait.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oA2IhLjU030979 for ; Tue, 2 Nov 2010 14:43:22 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 02 Nov 2010 19:28:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132295 Archived-At: >>>>> "Lars" == Lars Magne Ingebrigtsen writes: Lars> This is meant to be used to provide non-blocking domain lookups for Lars> things that are asynchronous. Having the Lisp code wait for this async Lars> lookup to finish would be, er, not helpful. :-) I guess there are 2 cases. One is make-network-process with :nowait t. In that case it seems to me that the work could be done entirely in C and failures reported to lisp via the sentinel function. The other is a blocking open. In this case, Emacs is already "blocking" in the sense that users can't do anything but wait. However, currently users also can't C-g out of it, and other I/O is blocked waiting for name resolution. I think my proposed approach could solve both these scenarios. If there's a reason to want async resolution but nothing else, then yeah, you'd need something more complicated. Tom