[Top][All Lists]

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

Re: threads and kill-buffer

From: Stefan Monnier
Subject: Re: threads and kill-buffer
Date: Wed, 05 Sep 2012 09:41:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> However, in the long run it would be good to make threads preemptive.
> In this case, it seems to me that switching the current buffer like this
> would be very surprising.  (But maybe still ok?)

If/when we make threads preemptive, I think the answer should be that
set-buffer would lock the buffer and kill-buffer would block until the
buffer is unlocked.
But preemption seems to be pretty far into the future, so I wouldn't
worry too much about it.

> One idea here would be to make various operations on buffers throw an
> exception if the killed buffer were used.  For example, "insert" would
> do this.

I don't think this is a good solution.

> Yet another idea is to make kill-buffer refuse to do this.

Rather than block, we could also make kill-buffer signal an error.
The advantage being that we can also provide this behavior for the
non-preemptive case and I think it would also help debug the problem
Lars points out.


reply via email to

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