emacs-devel
[Top][All Lists]
Advanced

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

Re: threads and kill-buffer


From: Tom Tromey
Subject: Re: threads and kill-buffer
Date: Wed, 05 Sep 2012 08:34:11 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Stefan> If/when we make threads preemptive, I think the answer should be that
Stefan> set-buffer would lock the buffer and kill-buffer would block until the
Stefan> buffer is unlocked.

FWIW, an earlier version of the threading patch gave each buffer a lock
and had set-buffer acquire it.  This doesn't work well in practice.  For
example, if you make a new thread, it will not run, since it is created
with the same current buffer as the parent thread.

For fully preemptive threads some kind of buffer lock will be needed,
but I think it would have to be on operations on the buffer, not
set-buffer.

Tom



reply via email to

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