From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: threads and kill-buffer Date: Wed, 05 Sep 2012 10:20:47 -0400 Organization: disorganization Message-ID: <87mx148sao.fsf@gnu.org> References: <87a9x55xvd.fsf@fleche.redhat.com> <83d321dvsr.fsf@gnu.org> Reply-To: sds@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346854873 3671 80.91.229.3 (5 Sep 2012 14:21:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2012 14:21:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 05 16:21:15 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9GTj-0005sX-Fy for ged-emacs-devel@m.gmane.org; Wed, 05 Sep 2012 16:21:15 +0200 Original-Received: from localhost ([::1]:42635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9GTg-0005x6-Fx for ged-emacs-devel@m.gmane.org; Wed, 05 Sep 2012 10:21:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9GTa-0005wR-Tt for emacs-devel@gnu.org; Wed, 05 Sep 2012 10:21:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9GTV-0005Mb-4O for emacs-devel@gnu.org; Wed, 05 Sep 2012 10:21:06 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9GTU-0005MQ-Tv for emacs-devel@gnu.org; Wed, 05 Sep 2012 10:21:01 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T9GTV-0005ff-JS for emacs-devel@gnu.org; Wed, 05 Sep 2012 16:21:01 +0200 Original-Received: from 74.113.160.197 ([74.113.160.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2012 16:21:01 +0200 Original-Received: from sds by 74.113.160.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2012 16:21:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 74.113.160.197 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:byo4P4ECRpAM3y+C1KyiJZeo9Ms= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153044 Archived-At: > * Eli Zaretskii [2012-09-05 05:53:56 +0300]: > > 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. At any rate, I don't think this behavior is very useful. It is a certain way to lose data: imagine thread T1 moving data from buffer B1 to buffer B2 and thread T2 killing one of these buffers. Killing B1 is fine, but killing B2 will lose data. Note that being the current buffer of another thread is an insufficient protection because a thread may be writing to several buffers and only one of them may be current to it, so a thread should be able to mark a buffer as used by it, so that an attempt to kill a buffer used by a live thread would result in an exception. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://palestinefacts.org http://www.memritv.org http://jihadwatch.org http://honestreporting.com When we break the law, they fine us, when we comply, they tax us.