02cd85181a
Motivation: GlobalEventExecutor.addTask was rightfully allowed to block by commit 09d38c8. However the same should have been done for SingleThreadEventExecutor.addTask. BlockHound is currently intercepting that call, and as a consequence, it prevents SingleThreadEventExecutor from working properly, if addTask is called from a thread that cannot block. The interception is due to LinkedBlockingQueue.offer implementation, which uses a ReentrantLock internally. Modifications: * Added one BlockHound exception to io.netty.util.internal.Hidden.NettyBlockHoundIntegration for SingleThreadEventExecutor.addTask. * Also added unit tests for both SingleThreadEventExecutor.addTask and GlobalEventExecutor.addTask. Result: SingleThreadEventExecutor.addTask can now be invoked from any thread when BlockHound is activated.