[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:
http://directory.fsf.org/project/c-ares/
Apparently glibc already includes getaddrinfo_a for this. It seems to
be undocumented, but this has some info & pointers:
http://bitsup.blogspot.com/2008/09/asynchronous-dns-lookups-on-linux-with.html
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.
Tom
- Re: Async DNS lookups,
Tom Tromey <=
- Re: Async DNS lookups, Ken Raeburn, 2010/11/02
- Re: Async DNS lookups, Lars Magne Ingebrigtsen, 2010/11/02
- Re: Async DNS lookups, Stefan Monnier, 2010/11/02
- Re: Async DNS lookups, Lars Magne Ingebrigtsen, 2010/11/02
- Re: Async DNS lookups, Tom Tromey, 2010/11/02
- Re: Async DNS lookups, Lars Magne Ingebrigtsen, 2010/11/02
- Re: Async DNS lookups, Tom Tromey, 2010/11/02
- Re: Async DNS lookups, Stefan Monnier, 2010/11/02
- Re: Async DNS lookups, Lars Magne Ingebrigtsen, 2010/11/03
- Re: Async DNS lookups, Davis Herring, 2010/11/03