unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: elisp test-and-set?
Date: Fri, 25 May 2018 20:38:35 -0400	[thread overview]
Message-ID: <CAM-tV-9MkQCTwHJgASMqifz7pF1b2KOpT8WgnE6YC+v-xt-_-g@mail.gmail.com> (raw)
In-Reply-To: <86po1jv4bv.fsf@stephe-leake.org>

On 25 May 2018 at 17:00, Stephen Leake <stephen_leake@stephe-leake.org> 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.



  reply	other threads:[~2018-05-26  0:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 21:00 elisp test-and-set? Stephen Leake
2018-05-26  0:38 ` Noam Postavsky [this message]
2018-05-26  7:08 ` Eli Zaretskii
2018-05-26  7:53   ` Stephen Leake
2018-05-26 21:14   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM-tV-9MkQCTwHJgASMqifz7pF1b2KOpT8WgnE6YC+v-xt-_-g@mail.gmail.com \
    --to=npostavs@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).