From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Wed, 03 Feb 2016 11:50:29 +1100 Message-ID: <87fuxazkfe.fsf@gnus.org> References: <87si1gx6wz.fsf@gnus.org> <86y4b5zvzt.fsf@gmail.com> <8760y9kwrk.fsf@gnus.org> <8760y7nag7.fsf@gnus.org> <83oabzzsjq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454460684 26717 80.91.229.3 (3 Feb 2016 00:51:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2016 00:51:24 +0000 (UTC) Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 03 01:51:14 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 1aQlf7-0001IP-Vn for ged-emacs-devel@m.gmane.org; Wed, 03 Feb 2016 01:51:14 +0100 Original-Received: from localhost ([::1]:60136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQlf7-0000o6-DF for ged-emacs-devel@m.gmane.org; Tue, 02 Feb 2016 19:51:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQlev-0000ny-Hu for emacs-devel@gnu.org; Tue, 02 Feb 2016 19:51:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQleq-0006kd-IO for emacs-devel@gnu.org; Tue, 02 Feb 2016 19:51:01 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:52972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQleq-0006kT-BF; Tue, 02 Feb 2016 19:50:56 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aQleU-0008IJ-0P; Wed, 03 Feb 2016 01:50:34 +0100 In-Reply-To: <83oabzzsjq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Feb 2016 05:42:49 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aQleU-0008IJ-0P MailScanner-NULL-Check: 1455065434.87944@vMMrHk5NJGhQR221h9sKHw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:199202 Archived-At: Eli Zaretskii writes: > Please don't merge before we complete the discussion of these changes. > For now, I'm not sure I agree with adding this feature as it is > implemented. What are your objections? I just ran into a problem, though. :-) erc does the following on connection: (make-network-process :name name :buffer buffer :host host :service service :nowait t) ... (when (fboundp 'set-process-coding-system) (set-process-coding-system process 'raw-text)) That function starts with: CHECK_PROCESS (process); p = XPROCESS (process); if (p->infd < 0) error ("Input file descriptor of %s closed", SDATA (p->name)); if (p->outfd < 0) error ("Output file descriptor of %s closed", SDATA (p->name)); And now, :nowait returns even before infd/outfd has been set, which means the async DNS isn't as invisible to the user as I had hoped... We could fix up the callers, of course, but that's a kinda yucky thing to do. Perhaps my original thought of having a separate :asynchronous parameter to make-network-stream is a better idea for backwards compatibility? Or... :nowait 'dns, perhaps. Then the libraries that want a fully async connection can say that explicitly by changing their ":nowait t"'s to ":nowait 'dns"? Opinions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no