At Fri, 27 Oct 2000 06:13:32 +0900, hipster <hipster / xs4all.nl> wrote: [...] > Every instance of class Object (and derivatives) can have a lock, or binary > semaphore, associated with it. When a method is called on an object that is > declared synchronized, or a method declared synchronized is called on an > object, or an object lock is explicitly obtained from within a member > method, the object becomes locked. hmm.. I thought Ruby is avoiding explicit declaration. of cause, 'never done' doesn't necessary mean bad, but kills consistency. [...] > Backward compatibility with the current semantics could be achieved by > defining `Thread.critical = false|true' as a method obtaining or releasing > the object lock for the instance that is in scope at the time of the call. > (But as the notion of a critical section is abstracted away from a thread, > some code `refactoring' ;) might be a better idea.) so, basically your proposal is based on async messaging model, right? I just found out it a few days ago, so I guess I'm not qualified to discuss about it. but let me write a few, anyway ;) I think we should first discuss what model Ruby should use. The current model is as I quote Matz on -list "a model from ML interpreter called CSL." which I don't know anything about ;P. [ruby-list:1767] dW recently had a java's thread article: http://www-4.ibm.com/software/developer/library/j-king.html?dwzone=java when I asked about async messaging model on -dev, Yanagawa told me that "the model is clean and simple, but implementation usually cost much more". [ruby-dev:11288] He also mentioned that "It's still arguable that which model is easy to understand". As I see Ruby, "easy to understand/program" is one of core feature we should keep. On the other side, Shugo and others are thinking about re-implementation of thread, too. Their idea is to keep current thread model and extend the thread premitives so that mutex and cv works with thread scheduler. Isn't it? > whoever reading ;) anyway, i guess it's time for thread novice to fade out and let others discuss. I hope I'll learn more and be able to comment on some. regards, -- yashi