Exemplo n.º 1
0
        static public RBasic NewThreadGroup(object[] argv, RMetaObject meta)
        {
            NetRuby      ruby = meta.ruby;
            RThreadGroup tg   = new RThreadGroup(ruby, meta);

            ruby.CallInit(tg, argv);
            return(tg);
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 static public RBasic NewThreadGroup(object[] argv, RMetaObject meta)
 {
     NetRuby ruby = meta.ruby;
     RThreadGroup tg = new RThreadGroup(ruby, meta);
     ruby.CallInit(tg, argv);
     return tg;
 }