Skip to content

Commit

Permalink
Update blockhound integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Maldini committed May 15, 2019
1 parent cfd36c1 commit a5da0df
Showing 1 changed file with 4 additions and 1 deletion.
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.SingleThreadEventExecutor;
import reactor.blockhound.BlockHound;
import reactor.blockhound.integration.BlockHoundIntegration;
import reactor.core.scheduler.NonBlocking;
Expand All @@ -34,8 +35,10 @@ public void applyTo(BlockHound.Builder builder) {
//allow set initialization that might use Yield
builder.allowBlockingCallsInside(ChannelInitializer.class.getName(), "initChannel");

//prevent blocking call in any netty event executor
//prevent blocking call in arbitrary netty event executor tasks
builder.disallowBlockingCallsInside(AbstractEventExecutor.class.getName(), "safeExecute");
//prevent blocking call in event loops
builder.disallowBlockingCallsInside(SingleThreadEventExecutor.class.getName()+"$5", "run");
}

}

0 comments on commit a5da0df

Please sign in to comment.