[Top][All Lists]

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

Re: Tree-sitter introduction documentation

From: Stefan Monnier
Subject: Re: Tree-sitter introduction documentation
Date: Sun, 01 Jan 2023 19:40:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>>>> 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, indeed by "asynchronous" I wasn't thinking of using threads, but
rather using `start-process` and then putting the "rest" into its

It's rather cumbersome to do, admittedly.
I have a work-in-progress library of "promises/futures" for Emacs which
should (eventually) make it easier, but that's not an option for the
`emacs-29` branch :-(


Attachment: futur.el
Description: application/emacs-lisp

reply via email to

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