emacs-devel
[Top][All Lists]
Advanced

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

Re: call-process blocks the active thread


From: Eli Zaretskii
Subject: Re: call-process blocks the active thread
Date: Fri, 08 Sep 2017 15:16:35 +0300

> From: Elias Mårtenson <address@hidden>
> Date: Fri, 8 Sep 2017 18:36:17 +0800
> Cc: emacs-devel <address@hidden>
> 
>  This is not a bug.
> 
> I'm not entirely sure why you feel that distinction is important.

I thought you were reporting it as a bug, so it was important for me
to say Emacs was working as designed in this case.

> At the end of the day, it's ‘start-process’ that
> doesn't yield while the external process runs. Is there a reason why it can't 
> be changed so that it does?

AFAIU, it would require significant changes in how call-process works,
both how it waits for the child process to exit and how it reads the
sub-process output.  And start-process already has all that figured
out, so I think it's easier to just use it, especially since threading
already supports start-process, in that the calling thread will yield
automatically while it reads sub-process output and/or waits for it to
exit.

Of course, it's possible I don't see some clever way to make
call-process thread-aware, which is why I said that if someone has
concrete ideas for how to do that, they are encouraged to speak up.



reply via email to

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