help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: No thread yield when using synchronous processes?


From: Philipp Stephani
Subject: Re: No thread yield when using synchronous processes?
Date: Sat, 22 Dec 2018 23:48:24 +0100

Am Do., 13. Dez. 2018 um 10:47 Uhr schrieb Michael Albinus
<michael.albinus@gmx.de>:
>
> Philipp Stephani <p.stephani2@gmail.com> writes:
>
> > Hi,
>
> Hi Philipp,
>
> > it seems like Emacs doesn't yield when using synchronous processes:
> >
> > (make-thread (lambda () (call-process "sleep" nil nil nil "5s")))
> >
> > ⇒ Emacs freezes for 5 seconds.
> >
> > Is there a reason for this behavior? The manual claims that Emacs
> > yields when waiting for process output, but that only seems to be the
> > case for asynchronous processes.
>
> The manual is clear about this: "when waiting for ... process output
> (e.g., during ‘accept-process-output’)". `accept-process-output' is used
> only for asynchronous processes.

That parenthetical says "e.g." and not "i.e.", implying that there are
other situations where Emacs waits for process output. Clearly the
"read" call made by call-process is such a situation, so I'd expect
this sentence to apply to them.



reply via email to

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