Search in sources :

Example 1 with GlobalEventExecutor

use of io.netty.util.concurrent.GlobalEventExecutor in project intellij-community by JetBrains.

the class NettyUtil method awaitQuiescenceOfGlobalEventExecutor.

@TestOnly
public static void awaitQuiescenceOfGlobalEventExecutor(long timeout, @NotNull TimeUnit unit) {
    try {
        @NotNull GlobalEventExecutor executor = GlobalEventExecutor.INSTANCE;
        executor.awaitInactivity(timeout, unit);
    } catch (InterruptedException ignored) {
    } catch (IllegalStateException ignored) {
    // thread did not start
    }
}
Also used : GlobalEventExecutor(io.netty.util.concurrent.GlobalEventExecutor) NotNull(org.jetbrains.annotations.NotNull) TestOnly(org.jetbrains.annotations.TestOnly)

Aggregations

GlobalEventExecutor (io.netty.util.concurrent.GlobalEventExecutor)1 NotNull (org.jetbrains.annotations.NotNull)1 TestOnly (org.jetbrains.annotations.TestOnly)1