emacs-devel
[Top][All Lists]
Advanced

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

Re: Asynchronous DNS


From: Alain Schneble
Subject: Re: Asynchronous DNS
Date: Mon, 8 Feb 2016 08:40:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Lars Ingebrigtsen <address@hidden> writes:

> Alain Schneble <address@hidden> writes:
>
>> Agreed.  A name reflecting more the level of "asynchronicity" would be a
>> better choice and less misleading, I think.
>
> :nowait 'immediate has a nice ring to it...

...yes, indeed :)

>> But as said, even better would be a solution where this distinction is
>> not necessary at all, IMHO.  But you tried it out and the only feasible
>> approach I see would be what Eli Zaretskii proposed, IIUC, to block and
>> synchronously wait for DNS resolve completion and socket initialization
>> in all the functions requiring a Lisp process having "valid" infd and/or
>> outfd set.  OTOH, that sounds quite invasive to those functions, doesn't
>> it?
>
> It would be better if the application code didn't have to care, but that
> means that either all those functions will have to block (getting us
> back to square one, basically), ...

Well, back to square /two/ I would say, depending on how you arrange the
squares ;) Because application code would just loose the
async-DNS-resolve benefits.  As most of the functions such as
`set-process-coding-system', that would need to block, require only an
initialized socked (and not really a connected one).  And if the author
of the code doesn't care, he just accepted that he wrote semi-optimized
async code -- but code that actually works.  This doesn't sound wrong to
me.  The only thing that could happen is that he might not be aware of it.

>                             ... or they'll have to set up a queue of
> pending actions to be taken, which I think is rather too ambitious. 

Yes, that would introduce a new level of complexity that feels like it
isn't worth it.




reply via email to

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