Skip to content

Commit c35fbff

Browse files
committed
qwe
1 parent cb4923c commit c35fbff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2153
-192
lines changed

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/Daemon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434

3535
boolean interruptOnStop() default false;
3636

37-
boolean useVirtual() default false;
37+
ThreadKind threadKind() default ThreadKind.PLATFORM_THREAD;
3838
}

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/ThreadExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void onAnnotatedMethod(Annotation hook, BeanIntrospector.OnMethod on) {
130130
DaemonOperationHandle h = on.newOperation(DAEMON_OPERATION_TEMPLATE).install(namespace, DaemonOperationHandle::new);
131131

132132
// Configure the handle
133-
h.useVirtual = daemon.useVirtual();
133+
h.useVirtual = daemon.threadKind() == ThreadKind.VIRTUAL_THREAD;
134134
} else {
135135
super.onAnnotatedMethod(hook, on);
136136
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2008 Kasper Nielsen.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package app.packed.concurrent;
17+
18+
/**
19+
*
20+
*/
21+
public enum ThreadKind {
22+
PLATFORM_THREAD, VIRTUAL_THREAD
23+
}

0 commit comments

Comments
 (0)