emacs-devel
[Top][All Lists]
Advanced

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

buffer transactions (was Re: Very interesting analysis of "the state of


From: Nic
Subject: buffer transactions (was Re: Very interesting analysis of "the state of Emacs")
Date: Mon, 05 May 2008 00:23:46 +0100

Richard M Stallman <address@hidden> writes:

>     Good point.  But I don't think it's a problem either: what I meant by
>     "multithreading within a single buffer" is that we'd have a lock per
>     buffer.  Whenever lisp code enters a buffer, we'd acquire the lock.
>
> What does it mean to "enter a buffer"?  Does calling `set-buffer' do
> that?
>
> If it means entering the code of a primitive that directly examines or
> alters the buffer contents, I would suggest not allowing a thread
> switch inside of them (or most primitives).  If the threads are
> implemented explicitly in our C code, switching can happen only where
> we want it to happen.  That would avoid lots of problems.  We would
> only allow thread switches at places where Lisp code can be run.

Just an idle thought... has anyone considered transactional support
for buffer modification in emacs? This would enable simultaneous
access to buffers by different processes/threads and (it seems) could
be implemented by changing the insert primitives in scope for a
background process to record a transaction log of all the changes a it
wants to make to a buffer (or variable for that matter) and merging it
with the state of the actual buffer on completion of the process.

-- 
Nic Ferrier
http://www.woome.com - Enjoy the minute!




reply via email to

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