netty5/common/src/main
Alexandre Dutra 02cd85181a
Allow blocking calls inside SingleThreadEventExecutor.addTask (#10811)
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.
2020-11-23 19:20:18 +01:00
..
java/io/netty/util Allow blocking calls inside SingleThreadEventExecutor.addTask (#10811) 2020-11-23 19:20:18 +01:00
resources/META-INF Fix native image build on modern GraalVM versions for the cases when the program uses netty-dns (#10630) 2020-10-26 08:34:31 +01:00
script Make IntObjectHashMap extend Map 2015-07-22 15:52:27 -07:00
templates/io/netty/util/collection Enable nohttp check during the build (#10708) 2020-10-23 14:44:18 +02:00