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: Sun, 21 Feb 2016 19:55:43 +0100 Message-ID: <86povp3nbk.fsf@realize.ch> References: <83io27ytu3.fsf@gnu.org> <87k2mmzkry.fsf@gnus.org> <83k2mlyet8.fsf@gnu.org> <87lh71nriy.fsf@gnus.org> <8637t8opla.fsf@realize.ch> <871t8skg6c.fsf@gnus.org> <86y4b0n5q2.fsf@realize.ch> <87fux7gb7o.fsf@gnus.org> <83wpqjvd2f.fsf@gnu.org> <87zivfobn4.fsf@gnus.org> <86y4ao5g1c.fsf@realize.ch> <87r3ggdo9f.fsf@gnus.org> <86twlb5yl4.fsf@realize.ch> <83d1rzz1mu.fsf@gnu.org> <86egcc49qu.fsf@realize.ch> <87io1k41cg.fsf@gnus.org> <86a8mv41s5.fsf@realize.ch> <8660xj40ky.fsf@realize.ch> <87r3g6iybb.fsf@gnus.org> <87bn7ahiit.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1456081006 4990 80.91.229.3 (21 Feb 2016 18:56:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 18:56:46 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 21 19:56: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 1aXZBU-0004wp-C4 for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 19:56:44 +0100 Original-Received: from localhost ([::1]:43350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXZBQ-0001cA-Dl for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 13:56:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXZBB-0001aH-5e for emacs-devel@gnu.org; Sun, 21 Feb 2016 13:56:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXZB7-0005kG-8a for emacs-devel@gnu.org; Sun, 21 Feb 2016 13:56:25 -0500 Original-Received: from clientmail.realize.ch ([46.140.89.53]:1250) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aXZB6-0005kA-RY for emacs-devel@gnu.org; Sun, 21 Feb 2016 13:56:21 -0500 Original-Received: from rintintin.hq.realize.ch.lan.rit ([192.168.0.105]) by clientmail.realize.ch ; Sun, 21 Feb 2016 19:56:12 +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; Sun, 21 Feb 2016 19:55:46 +0100 In-Reply-To: <87bn7ahiit.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 21 Feb 2016 14:03:22 +1100") 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:200395 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > I think all of Eli's comments have now been taken care of on the > async-dns branch, and all tests complete successfully, and everything > seems to work fine for me in daily use (Gnus, eww, erc, Emacs Server). Just two minor points that came to my mind right now: - Shouldn't the printf statements -- that were used for debugging purposes -- be removed before merging to master? See also attached patch below. - Would it be worth to mention somewhere, that some of the functions may block also for :nowait t when called outside of the sentinel callback (and in case the connection has not yet been established)? Or that they in turn should be called within the sentinel to get max asynchronous behavior in any case? For example, we could add a sentence to make-network-process in the description of :nowait param. What do you think? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-Remove-async-DNS-printf-debug-statements.patch" Content-Description: Patch >From db3fbe5e20c42c1034192d69ee5ccebdcfb57e96 Mon Sep 17 00:00:00 2001 From: Alain Schneble Date: Sun, 21 Feb 2016 12:02:02 +0100 Subject: [PATCH] Remove async DNS printf debug statements * src/process.c (make-network-process, wait_for_socket_fds, wait_while_connecting, wait_for_tls_negotiation): Remove printf debug statements. --- src/process.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/process.c b/src/process.c index 1f83327..6040be0 100644 --- a/src/process.c +++ b/src/process.c @@ -3777,7 +3777,6 @@ usage: (make-network-process &rest ARGS) */) { int ret; - printf("Async DNS for '%s'\n", SSDATA (host)); dns_requests = xmalloc (sizeof (struct gaicb*)); dns_requests[0] = xmalloc (sizeof (struct gaicb)); dns_requests[0]->ar_name = strdup (SSDATA (host)); @@ -4733,7 +4732,6 @@ wait_for_socket_fds (Lisp_Object process, char *name) while (XPROCESS (process)->infd < 0 && EQ (XPROCESS (process)->status, Qconnect)) { - printf("Waiting for socket from %s...\n", name); wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); } } @@ -4743,7 +4741,6 @@ wait_while_connecting (Lisp_Object process) { while (EQ (XPROCESS (process)->status, Qconnect)) { - printf("Waiting for connection...\n"); wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); } } @@ -4755,7 +4752,6 @@ wait_for_tls_negotiation (Lisp_Object process) while (XPROCESS (process)->gnutls_p && XPROCESS (process)->gnutls_initstage != GNUTLS_STAGE_READY) { - printf("Waiting for TLS...\n"); wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); } #endif -- 2.6.2.windows.1 --=-=-=--