Skip to content

Commit

Permalink
Add GlobalEventExecutor#addTask for BlockHound
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Maldini committed May 15, 2019
1 parent 8513dea commit 675d8aa
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import io.netty.channel.ChannelInitializer;
import io.netty.util.concurrent.AbstractEventExecutor;
import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.concurrent.SingleThreadEventExecutor;
import reactor.blockhound.BlockHound;
import reactor.blockhound.integration.BlockHoundIntegration;
Expand All @@ -34,6 +35,8 @@ public void applyTo(BlockHound.Builder builder) {

//allow set initialization that might use Yield
builder.allowBlockingCallsInside(ChannelInitializer.class.getName(), "initChannel");
//allow unbounded linked blocking queue
builder.disallowBlockingCallsInside(GlobalEventExecutor.class.getName(), "addTask");

//prevent blocking call in arbitrary netty event executor tasks
builder.disallowBlockingCallsInside(AbstractEventExecutor.class.getName(), "safeExecute");
Expand Down

0 comments on commit 675d8aa

Please sign in to comment.