List of usage examples for io.netty.channel EventLoopGroup submit
@Override Future<?> submit(Runnable task);
From source file:io.nodyn.loop.Blocking.java
License:Apache License
public void unblock(final Runnable action) { final EventLoopGroup elg = managedLoop.getEventLoopGroup(); final RefHandle refHandle = managedLoop.newHandle(); elg.submit(new Runnable() { @Override//from w w w . jav a 2s. c o m public void run() { try { action.run(); } finally { refHandle.unref(); } } }); }