Package org.jgroups.util

Examples of org.jgroups.util.ReusableThread.assignTask()


        t1=new LongRunningThread(1, 500);
        t2=new LongRunningThread(2, 300);

        t.start();

        t.assignTask(t1);
        t.waitUntilDone();
        assertTrue(t.done());
        t.assignTask(t2);
        t.waitUntilDone();
        assertTrue(t.done());
View Full Code Here


        t.start();

        t.assignTask(t1);
        t.waitUntilDone();
        assertTrue(t.done());
        t.assignTask(t2);
        t.waitUntilDone();
        assertTrue(t.done());
    }

    public void testStop() {
View Full Code Here

        ReusableThread t=new ReusableThread("Demo ReusableThread");

        LongRunningThread t1;
        t1=new LongRunningThread(1, 20000);

        t.assignTask(t1);
        Util.sleep(1000);
        t.stop();
        t.waitUntilDone();
        assertTrue(t.done());
        assertFalse(t.isAlive());
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.