[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 14:13:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

>> How about letting kill-buffer succeed, but delay the actual deletion
>> of the buffer until no thread has it as current, like what Posix
>> filesystems do with file deletion?
> I am not sure that Posix file systems do this "by design" and not as a
> side effect of an implementation detail.

I highly doubt it was a side effect of implementation.
More specifically, the implementation has to go to extra length to do
this.  And it is also a natural result of the design decision that aimed
at making read&write as lean&mean as possible, pushing the heavy lifting
to `open'.

> At any rate, I don't think this behavior is very useful.

To the extent that you can get virtually the same result by renaming the
file to a well-hidden name, it's pretty useful since it turns this
"special situation" into a situation that client code has to deal
with anyway thus reducing the number of special cases.

Note that for buffers, it's a bit different since a buffer can only have
a single name and that it always has one name, so while you can't
reliably ask for the file-name corresponding to a POSIX file-descriptor,
you can reliably ask for the buffer-name of the current buffer.


reply via email to

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