emacs-devel
[Top][All Lists]
Advanced

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

Re: threads and kill-buffer


From: SAKURAI Masashi
Subject: Re: threads and kill-buffer
Date: Wed, 05 Sep 2012 12:49:15 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.4 Mule/6.0 (HANACHIRUSATO)

Hi Tom,

> Suppose thread T has buffer B as its current buffer, and then some other
> thread evaluates (kill-buffer B).  What should happen in thread T?
> 
> I thought of a few options, but I'm not really sure which is best.

In java, some appropriate exception is thrown, such as
InterruptedException, ConcurrentModificationException and so on.

Preventing the exceptions, some thread controlling is also needed,
such as monitor, semaphore, lock and so on.


> Another problem with this approach is just that it is hard to implement.
> I see 1085 references to 'current_buffer' in the tree, and presumably
> I'd have to examine each one...

I think that this discussion is very important and the first step for
introducing the Emacs thread support. Before implementation, I would
hope that the behavior and specifications for the language (VM) and
library level should be discussed and defined well.
If it has been done, I would apologize for my meddler comment.

Though I have worked on development for server and client applications
with Java, C and Ruby, I feel the concurrency of the design and
programing is very difficult.

This book is introductory and very practical, even in Java.

Amazon.com: Java Concurrency in Practice:
Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea: 
Books
http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

In addition to the book, there are many good books for the concurrency design.
The design and implementation in the other languages also may be helpful.


--
SAKURAI, Masashi (family, given)
address@hidden



reply via email to

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