[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter introduction documentation
From: |
Eli Zaretskii |
Subject: |
Re: Tree-sitter introduction documentation |
Date: |
Mon, 02 Jan 2023 05:34:40 +0200 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 1 Jan 2023 16:31:30 -0800
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
> Philip Kaludercic <philipk@posteo.net>,
> Dmitry Gutov <dgutov@yandex.ru>,
> theophilusx@gmail.com,
> emacs-devel@gnu.org
>
>
>
> > On Dec 31, 2022, at 10:39 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> From: Yuan Fu <casouri@gmail.com>
> >> Date: Sat, 31 Dec 2022 17:16:11 -0800
> >> Cc: Eli Zaretskii <eliz@gnu.org>,
> >> Philip Kaludercic <philipk@posteo.net>,
> >> dgutov@yandex.ru,
> >> theophilusx@gmail.com,
> >> emacs-devel@gnu.org
> >>
> >>>
> >>>> I wanted to keep it simple, synchronous, and quiet, and didn’t thought
> >>>> much about it.
> >>>
> >>> I think we should default to asynchonous operations as much as possible.
> >>
> >> If you are talking about the whole command, maybe. Does call-process
> >> automatically yield when ran in a make-thread?
> >
> > No, it doesn't. And it's threads that yield, not Emacs primitives. A
> > thread will yield when it calls some API that invokes pselect.
>
> Thanks. I guess what I’m asking is that if I run the command in make-thread,
> will the thread yield when it’s waiting for the subprocess? I tried it and it
> still blocks Emacs so I guess the answer is no. But maybe I’m doing it wrong.
No, it isn't supposed to yield, because waiting for the process in
this case is done by calling a C library function, not via the Emacs
waiting loop.