Example usage for io.netty.util ThreadDeathWatcher watch

List of usage examples for io.netty.util ThreadDeathWatcher watch

Introduction

In this page you can find the example usage for io.netty.util ThreadDeathWatcher watch.

Prototype

public static void watch(Thread thread, Runnable task) 

Source Link

Document

Schedules the specified task to run when the specified thread dies.

Usage

From source file:com.datatorrent.netlet.AbstractClientTest.java

License:Open Source License

private static Thread watchForDefaultEventLoopThread(final Thread thread, final CountDownLatch latch) {
    ThreadDeathWatcher.watch(thread, new Runnable() {
        @Override//from  w w w.j a  va  2  s  . c  om
        public void run() {
            latch.countDown();
        }
    });
    return thread;
}