Package org.jruby.ext.thread

Examples of org.jruby.ext.thread.SizedQueue


        Ruby runtime = context.runtime;
       
        ThreadFiber rootFiber = new ThreadFiber(runtime, runtime.getClass("Fiber")); // FIXME: getFiber()
       
        assert runtime.getClass("SizedQueue") != null : "SizedQueue has not been loaded";
        rootFiber.data = new FiberData(new SizedQueue(runtime, runtime.getClass("SizedQueue"), 1), null, rootFiber);
        rootFiber.thread = context.getThread();
        context.setRootFiber(rootFiber);
    }
View Full Code Here


    public IRubyObject initialize(ThreadContext context, Block block) {
        Ruby runtime = context.runtime;
       
        if (!block.isGiven()) throw runtime.newArgumentError("tried to create Proc object without block");

        data = new FiberData(new SizedQueue(runtime, runtime.getClass("SizedQueue"), 1), context.getFiberCurrentThread(), this);
       
        FiberData currentFiberData = context.getFiber().data;
       
        thread = createThread(runtime, data, currentFiberData.queue, block);
       
View Full Code Here

TOP

Related Classes of org.jruby.ext.thread.SizedQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.