From: Urabe Shyouhei Date: 2011-10-08T22:37:31+09:00 Subject: [ruby-core:40057] Re: 2.0 feature questionnaire (10/08/2011 08:45 AM), SASADA Koichi wrote: > We already have implemented similar idea. "We" here includes me. > However, it is different. > > (1) Init_foo() and InitVM_foo() > > We require Init_foo() and InitVM_foo(). Init_foo() is called at first > time. InitVM_foo() is called every time VM requires it. Technical background behind this: an extension might need a global setup. For instance pthread_key_create() and similar thing should be called at most once. So we provide a way for extensions to do such things. OTOH on MVM situations, rb_define_class() and other setups that were done in Init_foo should now be per VM. So we provide a place for them. That is InitVM_foo.