List of usage examples for io.netty.util.concurrent EventExecutor inEventLoop
boolean inEventLoop(Thread thread);
From source file:dorkbox.network.connection.Shutdownable.java
License:Apache License
/** * Check to see if the current thread is running from it's OWN thread, or from Netty... This is used to prevent deadlocks. * * @return true if the specified thread is as Netty thread, false if it's own thread. */// w w w. ja v a2 s . co m protected boolean isInEventLoop(Thread thread) { for (EventLoopGroup loopGroup : eventLoopGroups) { for (EventExecutor next : loopGroup) { if (next.inEventLoop(thread)) { return true; } } } return false; }