emacs-devel
[Top][All Lists]
Advanced

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

Re: Using incremental parsing in Emacs


From: Stefan Monnier
Subject: Re: Using incremental parsing in Emacs
Date: Sun, 05 Jan 2020 15:27:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> That's exactly the issue: if we need to make a copy just to run the
> parser asynchronously, then there's no advantage significant in having
> such asynchronous processing inside the Emacs process,

There can still be advantages depending on many other details.

Another option is to give them direct access to the buffer, but only
allow read-only access and impose some synchronization between the
threads, e.g.: prepare_before_change could signal the concurrent
threads and wait for them to acknowledge that they can't look at the
buffer positions after START and then re-allow access past START when we
finish the buffer modification or when we return to the command loop).

Similarly, when buffer relocation takes place, we'd first signal to
concurrent threads and wait for them to acknowledge that they've stopped
accessing the buffer's content, and later re-signal them to let them
know they can access it again.


        Stefan




reply via email to

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