Hi,

At Thu, 15 Jan 2004 13:55:44 +0900,
Hal Fulton wrote:
> >>I suppose singleton.rb is thread safe?
> > 
> > Just using Thread.critical.  And seems close to your idea
> > excepting for it uses "instance" method rather than "new".

Not accurate, it uses 3-state; before, during and after
creation, but I feel it should use mutex or something.

> Actually I like "new" instead of "instance". I guess this
> (instance) is to emphasize that there can only be one. But
> I prefer simply calling new as usual, which was why I did this.

singleton.rb is for generic use, so it gets rid of overriding
instance methods, I guess.

-- 
Nobu Nakada