Skip to content

Commit

Permalink
JDK24 adds JavaLangAccess.virtualThreadDelayedTaskSchedulers()
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Feng <[email protected]>
  • Loading branch information
JasonFengJ9 committed Dec 4, 2024
1 parent 4f06ea8 commit daeb37c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
import sun.reflect.annotation.AnnotationType;
/*[IF JAVA_SPEC_VERSION >= 24]*/
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import jdk.internal.loader.NativeLibraries;
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

Expand Down Expand Up @@ -864,6 +865,13 @@ public byte stringInitCoder() {
public Executor virtualThreadDefaultScheduler() {
return VirtualThread.defaultScheduler();
}

/*[IF !INLINE-TYPES]*/
@Override
/*[ENDIF] !INLINE-TYPES */
public Stream<ScheduledExecutorService> virtualThreadDelayedTaskSchedulers() {
return VirtualThread.delayedTaskSchedulers();
}
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/*[ENDIF] JAVA_SPEC_VERSION >= 9 */
Expand Down

0 comments on commit daeb37c

Please sign in to comment.