Subject: bug#22789: 25.1.50; In last master build https connections stop working

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 01 Mar 2016 16:17:13 +1100

All the immediate ideas I have to ensure we have a timer that triggers
`wait_reading_process_output' now and then when we have processes
waiting for DNS or to complete TLS negotiation remind me too much of
reference counting.  There's always an off by one error or a race
condition when counting.  :-)

But, basically, we have to have a way to say "I'm starting this stuff
now, and the timer should continue to trigger every 50ms until I'm
done".  And then stop when they're all done...

Perhaps it isn't as difficult as all that, since Emacs is pretty single
threaded.  That is, when calling getaddrinfo_a or try_negotiate, we'd
have a function that would start the timer unless it's already running.
And the timer itself could just look through the process list and see if
any such processes remain, and then just commit sudoku if there are no
such processes remaining.

Now, if Emacs were multithreaded in many dimensions, this would be
pretty error prone, but perhaps it's not the way Emacs is now?

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