Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdaf2b3e

Browse files
committed
Stop using named (with counter) VT names due tohttps://bugs.openjdk.org/browse/JDK-8372410
1 parent34e5e88 commitdaf2b3e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎extensions/virtual-threads/runtime/src/main/java/io/quarkus/virtual/threads/VirtualThreadsConfig.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
publicinterfaceVirtualThreadsConfig {
1414

1515
/**
16-
* Virtual threadname prefix. The name of the virtual thread will be the prefix followed by a unique number.
16+
* Virtual threadnames. The name of the virtual thread will be the prefix followed by a unique number.
1717
*/
18-
@WithDefault("quarkus-virtual-thread-")
18+
@WithDefault("quarkus-virtual-thread")
1919
Optional<String>namePrefix();
2020

2121
/**

‎extensions/virtual-threads/runtime/src/main/java/io/quarkus/virtual/threads/VirtualThreadsRecorder.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ static ExecutorService newVirtualThreadPerTaskExecutorWithName(String prefix)
117117
Class<?>vtbClass =Class.forName("java.lang.Thread$Builder$OfVirtual");
118118
// .name()
119119
if (prefix !=null) {
120-
Methodname =vtbClass.getMethod("name",String.class,long.class);
121-
vtb =name.invoke(vtb,prefix,0);
120+
// why this is not using name(prefix, 0)?
121+
// see https://bugs.openjdk.org/browse/JDK-8372410
122+
Methodname =vtbClass.getMethod("name",String.class);
123+
vtb =name.invoke(vtb,prefix);
122124
}
123125
// .uncaughtExceptionHandler()
124126
MethoduncaughtHandler =vtbClass.getMethod("uncaughtExceptionHandler",Thread.UncaughtExceptionHandler.class);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp