Examples of SocketRunnableComparator


Examples of org.cspoker.common.util.threading.SocketRunnableComparator

public class PrioritizableComparator extends TestCase {

  public void testCompare() {
    PriorityBlockingQueue<Runnable> queue = new PriorityBlockingQueue<Runnable>(
        50, new SocketRunnableComparator());

    queue.add(new TestRunnable("runnable 1"));
    queue.add(new TestPrioritizable(-1, "runnable 2"));
    queue.add(new TestPrioritizable(-1, "runnable 3"));
    queue.add(new TestPrioritizable(5, "runnable 4"));
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.