From: Christian Kruse Date: 2002-05-29T10:02:09+09:00 Subject: Re: Singleton Class Hallo, On Wed, 29 May 2002 09:50:18 +0900 "Mike Depot" wrote: > I've seen the construct below, but I've read it's not thread safe. > First, why isn't it? What happens, if two threads create an instance, simultaniously? > Second, is there a more proper way to do this, perhaps that's even > thread safe? require 'singleton' class Singltn include Singleton def initialize raise NotImplementedError end; end; x = Singltn.instance; Greetings, CK