[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp test-and-set?
From: |
Noam Postavsky |
Subject: |
Re: elisp test-and-set? |
Date: |
Fri, 25 May 2018 20:38:35 -0400 |
On 25 May 2018 at 17:00, Stephen Leake <address@hidden> wrote:
> Since faces are computed by font-lock, which runs on a timer in the
> background, it can try to run when indent is running in the foreground.
Only if the foreground indent function calls `accept-process-output',
`sit-for', or something like that.
> In other contexts I'd use a "test and set" instruction for this; read
> the flag and set it true in one uninterruptible action. I don't see
> anything like that in elisp, and searching in the elisp manual for
> "mutual" and "exclusion" is no help.
There is `(elisp) Mutexes' (as of Emacs 26), but even with threads
enabled, only a single Lisp thread runs at one time, so there's not
really a need for it at the moment.