From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alain Schneble Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Mon, 15 Feb 2016 01:14:51 +0100 Message-ID: <86k2m66d8k.fsf@realize.ch> References: <877fihjo4m.fsf@gnus.org> <86io20n3xn.fsf@realize.ch> <8760y055l1.fsf@gnus.org> <8660xzmyyr.fsf@realize.ch> <87pow7ocyw.fsf@gnus.org> <861t8nmxlj.fsf@realize.ch> <87y4auiurw.fsf@gnus.org> <86k2me8dee.fsf@realize.ch> <83a8n9ddk5.fsf@gnu.org> <864mdh8vj5.fsf@realize.ch> <87pow579kt.fsf@gnus.org> <86ziv87st0.fsf@realize.ch> <87vb5u4qtq.fsf@gnus.org> <86egci6xvk.fsf@realize.ch> <87twldgsrv.fsf@gnus.org> <8637sw7w4m.fsf@realize.ch> <87vb5sdod6.fsf@gnus.org> <83lh6nzvfp.fsf@gnu.org> <87fuwv6ai4.fsf@gnus.org> <83h9hbz20t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455495354 21253 80.91.229.3 (15 Feb 2016 00:15:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2016 00:15:54 +0000 (UTC) Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 15 01:15:45 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 1aV6pL-0002XK-P6 for ged-emacs-devel@m.gmane.org; Mon, 15 Feb 2016 01:15:43 +0100 Original-Received: from localhost ([::1]:54724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV6pK-0004nS-FQ for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 19:15:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV6pF-0004n3-0K for emacs-devel@gnu.org; Sun, 14 Feb 2016 19:15:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aV6pD-0007cH-SL for emacs-devel@gnu.org; Sun, 14 Feb 2016 19:15:36 -0500 Original-Received: from clientmail.realize.ch ([46.140.89.53]:3139) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aV6p8-0007b8-6H; Sun, 14 Feb 2016 19:15:30 -0500 Original-Received: from rintintin.hq.realize.ch.lan.rit ([192.168.0.105]) by clientmail.realize.ch ; Mon, 15 Feb 2016 01:15:16 +0100 Original-Received: from MYNGB (192.168.66.64) by rintintin.hq.realize.ch.lan.rit (192.168.0.105) with Microsoft SMTP Server (TLS) id 15.0.516.32; Mon, 15 Feb 2016 01:14:52 +0100 In-Reply-To: <83h9hbz20t.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Feb 2016 18:32:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-ClientProxiedBy: rintintin.hq.realize.ch.lan.rit (192.168.0.105) To rintintin.hq.realize.ch.lan.rit (192.168.0.105) X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] X-Received-From: 46.140.89.53 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:199944 Archived-At: Eli Zaretskii writes: >> From: Lars Ingebrigtsen >> Cc: a.s@realize.ch, emacs-devel@gnu.org >> Date: Sun, 14 Feb 2016 18:01:39 +1100 >> >> The issue is losing asynchronicity. A function that previously called >> >> (progn >> (make-network-stream ... :nowait t) >> (set-process-coding-system ...)) >> >> would not block. With the proposed blockers (unless we add fine-grained >> code to all the process function to only block if we haven't even done >> DNS yet), this code will block. And that's a regression. > > If set-process-coding-system worked in the above snippet, it means it > doesn't need to block waiting for a fully capable process object. If > it didn't work (as in signaled an error), then there's no regression. set-process-coding-system, how it is currently implemented on master, requires valid infd/outfd, hence an initialized socket. make-network-process until now did initialize a socket also with :nowait t. That is no longer the case in the feature/async-dns branch with the :nowait 'dns option, where make-network-stream returns without having initialized a socket. In the "Make-process-functions-wait-for-DNS-completion" patch I sent in the previous message, set-process-coding-system now waits until the socket has been initialized. Thus, there should no longer be any regressions in this case.