[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous DNS
From: |
Alain Schneble |
Subject: |
Re: Asynchronous DNS |
Date: |
Sun, 21 Feb 2016 19:55:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Lars Ingebrigtsen <address@hidden> 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?
>From db3fbe5e20c42c1034192d69ee5ccebdcfb57e96 Mon Sep 17 00:00:00 2001
From: Alain Schneble <address@hidden>
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
- Re: Asynchronous DNS, (continued)
- Re: Asynchronous DNS, Alain Schneble, 2016/02/16
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/19
- Re: Asynchronous DNS, Paul Eggert, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Paul Eggert, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/21
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS,
Alain Schneble <=
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/22
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/24
- Re: Asynchronous DNS, Paul Eggert, 2016/02/24
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/24
- Re: Asynchronous DNS, John Wiegley, 2016/02/24