Skip to content

Conversation

@Arooba-git
Copy link

Hi! 👋
Apparently channelRead in BridgeRuntime is blocking the main thread (as detected by blockhound):
Screen Shot 2023-07-16 at 12 42 30 AM

This PR fixes the blocking so that the pipeline remain reactive end-to-end.

import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Do not use *

@Sharable
public class BridgeRuntime extends HttpStaticFileServerHandler {

private final ExecutorService executor = Executors.newSingleThreadExecutor();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this optional, and the Thread pool configuration and optional. Making it the default change the current behaviour, and we will have to bump to a major version 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants