emacs-devel
[Top][All Lists]
Advanced

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

Re: multi-threaded Emacs


From: Stefan Monnier
Subject: Re: multi-threaded Emacs
Date: Sun, 30 Nov 2008 16:51:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> Internal data shared among threads must be accessed only inside critical
> sections in the .c code to have atomic operations on it.

So what happens when you execute two thread both doing

   (setq a (1+ a))

if you only do the locking in C, that means that `setq' will be atomic
and reading `a' is atomic, but the whole increment is not atomic.

As mentioned earlier, synchronization primitives will need to be
provided to Elisp.


        Stefan




reply via email to

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