Package org.jruby

Examples of org.jruby.RubyThreadGroup.list()


        final Object start = new Object();
        final Exception[] fail = {null};
       
        RubyThreadGroup rtg = (RubyThreadGroup)manager_.eval("ruby", "(java)", 1, 1, "ThreadGroup::Default");
       
        int initialCount = ((RubyArray)rtg.list(Block.NULL_BLOCK)).getLength();
       
        synchronized (start) {
            Thread pausyThread = new Thread() {
                public void run() {
                    synchronized (this) {
View Full Code Here


       
        // if any exceptions were raised, we fail
        assertNull(fail[0]);
       
        // there should only be one more thread in thread group than before we started
        assertEquals(initialCount + 1, ((RubyArray)rtg.list(Block.NULL_BLOCK)).getLength());
    }

    class Runner extends Thread {
        private int count_;
        private boolean failed;
View Full Code Here

        final Object start = new Object();
        final Exception[] fail = {null};
       
        RubyThreadGroup rtg = (RubyThreadGroup)manager_.eval("ruby", "(java)", 1, 1, "ThreadGroup::Default");
       
        int initialCount = ((RubyArray)rtg.list(Block.NULL_BLOCK)).getLength();

        Thread pausyThread = new Thread() {
            public void run() {
                synchronized (this) {
                    // Notify the calling thread that we're about to go to sleep the first time
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.