Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x: Make sure all threads are named #5359

Closed
barchetta opened this issue Nov 9, 2022 · 2 comments
Closed

4.x: Make sure all threads are named #5359

barchetta opened this issue Nov 9, 2022 · 2 comments
Assignees
Labels
4.x Version 4.x Níma Helidon Níma P3

Comments

@barchetta
Copy link
Member

barchetta commented Nov 9, 2022

In 2.x we made an effort to make sure all threads are named (#4159, #3784). Looking at the 4.x code it doesn't look like we are naming VirtualThreads:

./webclient/webclient/src/main/java/io/helidon/nima/webclient/LoomClient.java:        return Executors.newThreadPerTaskExecutor(Thread.ofVirtual()
./webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java:        this.readerExecutor = Executors.newThreadPerTaskExecutor(Thread.ofVirtual()
./webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java:        this.sharedExecutor = Executors.newThreadPerTaskExecutor(Thread.ofVirtual()
./webserver/webserver/src/main/java/io/helidon/nima/webserver/ConnectionHandler.java:            //                                                         Thread.ofVirtual().factory(), (scope, future) -> {})) {
./webserver/webserver/src/main/java/io/helidon/nima/webserver/LoomServer.java:        this.executorService = Executors.newThreadPerTaskExecutor(Thread.ofVirtual()
./fault-tolerance/src/main/java/io/helidon/nima/faulttolerance/AsyncImpl.java:        this.executor = LazyValue.create(Executors.newVirtualThreadPerTaskExecutor());
./fault-tolerance/src/main/java/io/helidon/nima/faulttolerance/AsyncImpl.java:                : LazyValue.create(Executors.newVirtualThreadPerTaskExecutor());

We should ensure all threads, virtual or not, are named with something useful.

We should also keep an eye on the JDK efforts for organizing and displaying thread dumps for virtual threads to see if there is anything else we should do in this area.

@barchetta barchetta added 4.x Version 4.x Níma Helidon Níma labels Nov 9, 2022
@m0mus m0mus added the P3 label Nov 10, 2022
@tomas-langer
Copy link
Member

  1. Some threads are named from within the threads (as we may use the socket id).
  2. Structured concurrency is on the radar - there were too big changes in the API when Nima was created, let's wait for that feature to settle

@tomas-langer
Copy link
Member

Resolved by #5397

@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x Níma Helidon Níma P3
Projects
Archived in project
Development

No branches or pull requests

3 participants