On Fri, Nov 22, 2002 at 12:47:32AM +0900, dblack / candle.superlink.net wrote:
>   def self.my_new
>     obj = new
>     class << obj; public :other_initialize; end
>     obj.other_initialize
>     class << obj; private :other_initialize; end
>     obj
>   end

This isn't thread-safe.  Consider:
  1) I create two objects
  2) The first constructor makes other_initialize public
  3) The second constructor makes other_initialize public
  4) The first constructor calls other_initialize
  5) The first constructor makes other_initialize private
  6) The second constructor will fail when it calls other_initialize

It's also possible to call other_initialize from one thread while
another thread is constructing one of these objects.

Paul