Package net.jodah.concurrentunit

Examples of net.jodah.concurrentunit.Waiter.resume()


    new Thread(new Runnable() {
      @Override
      public void run() {
        try {
          circuit.await();
          waiter.resume();
        } catch (InterruptedException e) {
        }
      }
    }).start();
View Full Code Here


    for (int i = 0; i < 2; i++)
      runInThread(new Runnable() {
        public void run() {
          try {
            performInvocation();
            waiter.resume();
          } catch (Throwable t) {
            waiter.fail(t);
          }
        }
      });
View Full Code Here

  protected void startCluster(Set<Copycat> contexts) throws Throwable {
    Waiter waiter = new Waiter();
    for (Copycat context : contexts) {
      context.start().whenComplete((result, error) -> {
        waiter.assertNull(error);
        waiter.resume();
      });
    }

    waiter.await(10000, contexts.size());
  }
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.