|
From: | yyoncho |
Subject: | Re: Using incremental parsing in Emacs |
Date: | Sun, 5 Jan 2020 23:12:56 +0200 |
> 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
[Prev in Thread] | Current Thread | [Next in Thread] |