[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Async DNS lookups

From: Tom Tromey
Subject: Re: Async DNS lookups
Date: Mon, 01 Nov 2010 10:09:16 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>>>> "Lars" == Lars Magne Ingebrigtsen <address@hidden> writes:

Lars> I don't really see any easy fixes for this with Emacs' feature set at
Lars> the moment.  A process filter will block Emacs' "main thread", and it
Lars> needs to resolve the addresses, so...

Lars> 1) implement a C-level resolving functionality that has a callback that
Lars> will be called upon resolving the address.  This seems hard.

There is a GNU library for this:


Apparently glibc already includes getaddrinfo_a for this.  It seems to
be undocumented, but this has some info & pointers:


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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]