internal static void Init(NetRuby rb) { RThreadGroupClass t = new RThreadGroupClass(rb); t.DefineClass("ThreadGroup", rb.cObject); rb.cThreadGroup = t; t.DefineSingletonMethod("new", new RMethod(tg_new), -1); t.DefineMethod("list", new RMethod(list), 0); t.DefineMethod("add", new RMethod(add), 1); RThreadGroup rg = (RThreadGroup)tg_new(t); t.ConstSet(rb.intern("Default"), rg); rg.Add(rb.GetCurrentContext()); }
internal void Init(NetRuby rb) { if (klass == null) { klass = rb.cThread; } rClass = rb.cObject; ////frame.self = rb.topSelf; ////cRef = rb.topCRef; abortOnException = rb.cThread.abortOnException; RThreadGroup tg = (RThreadGroup)rb.cThreadGroup.ConstGetAt(rb.intern("Default")); tg.Add(this); }