emacs-devel
[Top][All Lists]
Advanced

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

Re: multi-threaded Emacs


From: Giuseppe Scrivano
Subject: Re: multi-threaded Emacs
Date: Sun, 30 Nov 2008 23:10:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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.

Yes, the locking in C is needed to make atomic Elisp primitives, it is
only the first step.
For atomic expressions there is need to add these functions in Elisp
too that delegate the job to the C functions.

Giuseppe




reply via email to

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