all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
To: Emacs Developers <emacs-devel@gnu.org>
Subject: Re: Async DNS lookups
Date: Tue, 2 Nov 2010 12:15:10 -0400	[thread overview]
Message-ID: <C082E08D-4CD7-4874-A19D-A5FF3A238E31@raeburn.org> (raw)
In-Reply-To: <m3aaltauvn.fsf@fleche.redhat.com>

On Nov 1, 2010, at 12:09, Tom Tromey wrote:
> A couple other approaches come to mind as well.
> 
> You could run the synchronous resolver in a new thread, and have the
> main thread run the event loop.
> 
> You could use a small helper program instead of calling the resolver
> in-process.  That is basically the same as the previous idea,
> substituting a process for a thread.

These would have the advantage that, rather than interacting with DNS directly, you can call getaddrinfo and use /etc/hosts or anything else configured by nsswitch or equivalent.  Assuming that all name-resolution calls should go straight to DNS (when you're not specifically looking for non-A/AAAA/PTR data) would be incorrect....

I think getaddrinfo_a looks nice, but I'd rather not use it unless we also have a workaround for non-glibc systems.  Presumably that would use your basic "spin off a thread that blocks in getaddrinfo and invokes a callback when done" approach, which (according to the blog Tom pointed to) is all getaddrinfo_a does anyways.  Maybe that means the code could be borrowed; maybe that means we should just implement the latter and not bother with getaddrinfo_a.

Ken


  reply	other threads:[~2010-11-02 16:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 11:57 Async DNS lookups Lars Magne Ingebrigtsen
2010-10-30 13:11 ` Julien Danjou
2010-10-30 13:34 ` Ted Zlatanov
2010-10-30 15:40 ` Helmut Eller
2010-10-31  4:01 ` Stefan Monnier
2010-10-31 17:16   ` Lars Magne Ingebrigtsen
2010-11-01 16:09 ` Tom Tromey
2010-11-02 16:15   ` Ken Raeburn [this message]
2010-11-02 16:29     ` Lars Magne Ingebrigtsen
2010-11-02 17:28       ` Stefan Monnier
2010-11-02 18:13         ` Lars Magne Ingebrigtsen
2010-11-02 18:30           ` Tom Tromey
2010-11-02 18:28             ` Lars Magne Ingebrigtsen
2010-11-02 18:47               ` Tom Tromey
2010-11-02 21:28           ` Stefan Monnier
2010-11-03 19:46             ` Lars Magne Ingebrigtsen
2010-11-03 21:29               ` Davis Herring
2010-11-03 21:46                 ` Lars Magne Ingebrigtsen
2010-11-04  2:24                   ` Stefan Monnier
2010-11-04  8:27                     ` Andreas Schwab
2010-11-04 14:15                       ` Stefan Monnier
2010-11-04 16:09                         ` Ken Raeburn
2010-11-04 19:49                         ` Lars Magne Ingebrigtsen
2010-11-04 20:40                         ` Davis Herring
2010-11-04 21:32                           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C082E08D-4CD7-4874-A19D-A5FF3A238E31@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.