emacs-devel
[Top][All Lists]
Advanced

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

Re: Asynchronous DNS


From: Lars Ingebrigtsen
Subject: Re: Asynchronous DNS
Date: Wed, 03 Feb 2016 11:50:29 +1100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Please don't merge before we complete the discussion of these changes.
> For now, I'm not sure I agree with adding this feature as it is
> implemented.

What are your objections?

I just ran into a problem, though.  :-)

erc does the following on connection:

(make-network-process :name name :buffer  buffer
                      :host host :service service :nowait t)
...
(when (fboundp 'set-process-coding-system)
  (set-process-coding-system process 'raw-text))

That function starts with:

  CHECK_PROCESS (process);
  p = XPROCESS (process);
  if (p->infd < 0)
    error ("Input file descriptor of %s closed", SDATA (p->name));
  if (p->outfd < 0)
    error ("Output file descriptor of %s closed", SDATA (p->name));

And now, :nowait returns even before infd/outfd has been set, which
means the async DNS isn't as invisible to the user as I had hoped...

We could fix up the callers, of course, but that's a kinda yucky thing
to do.  Perhaps my original thought of having a separate :asynchronous
parameter to make-network-stream is a better idea for backwards
compatibility?  Or...  :nowait 'dns, perhaps.  Then the libraries that
want a fully async connection can say that explicitly by changing their
":nowait t"'s to ":nowait 'dns"?

Opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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