Example usage for io.netty.util.concurrent Promise await

List of usage examples for io.netty.util.concurrent Promise await

Introduction

In this page you can find the example usage for io.netty.util.concurrent Promise await.

Prototype

@Override
    Promise<V> await() throws InterruptedException;

Source Link

Usage

From source file:com.turo.pushy.apns.AbstractClientServerTest.java

License:Open Source License

@AfterClass
public static void tearDownAfterClass() throws Exception {
    final PromiseCombiner combiner = new PromiseCombiner();
    combiner.addAll(CLIENT_EVENT_LOOP_GROUP.shutdownGracefully(), SERVER_EVENT_LOOP_GROUP.shutdownGracefully());

    final Promise<Void> shutdownPromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE);
    combiner.finish(shutdownPromise);//w w w . j  av  a 2 s.  c  o  m
    shutdownPromise.await();
}