Subject: bug#22493: 25.1.50; open-gnutls-stream doesn't respect :nowait, so the connections are synchronous

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Feb 2016 20:50:17 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 01 Feb 2016 05:01:55 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > There's no such thing in Emacs as an idle thread.
> 
> Sorry; I meant the idle loop.

A sentinel indeed starts when Emacs is idle, but once it kicks in, it
runs to completion, and Emacs cannot do anything else while it does.
So if the user presses a key a millisecond after the sentinel is
invoked and starts the GnuTLS negotiation procedure, the user will
still have to wait.

So once again I must ask what exactly do we gain with these changes.
If all we want is to make the GnuTLS negotiation wait until Emacs is
idle, we could run it from an idle timer, which would have been
simpler, and won't require us to have a process object in a strange
limbo state that cannot be communicated through.