Add GlobalEventExecutor#addTask to BlockHound exceptions. (#10262)

Motivation:

GlobalEventExecutor#addTask may be called during SingleThreadEventExecutor shutdown.
May result in a blocking call, because GlobalEventExecutor#taskQueue is a BlockingQueue.

Modifications:

Add allowBlockingCallsInside configuration for GlobalEventExecutor#addTask.

Result:

Fixes #10257.
When BlockHound is installed, GlobalEventExecutor#addTask is not reported as a blocking call.
This commit is contained in:
Piotr Betkier 2020-05-11 08:51:38 +02:00 committed by GitHub
parent 79915347c6
commit 09d38c87df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,10 @@ class Hidden {
"io.netty.util.concurrent.GlobalEventExecutor", "io.netty.util.concurrent.GlobalEventExecutor",
"takeTask"); "takeTask");
builder.allowBlockingCallsInside(
"io.netty.util.concurrent.GlobalEventExecutor",
"addTask");
builder.allowBlockingCallsInside( builder.allowBlockingCallsInside(
"io.netty.util.concurrent.SingleThreadEventExecutor", "io.netty.util.concurrent.SingleThreadEventExecutor",
"takeTask"); "takeTask");