Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

(0.37) Initialize Continuation.vthread in constructor #87

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/lang/VirtualThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved
* ===========================================================================
*/
package java.lang;
Expand Down Expand Up @@ -177,6 +177,7 @@ static ContinuationScope continuationScope() {
private static class VThreadContinuation extends Continuation {
VThreadContinuation(VirtualThread vthread, Runnable task) {
super(VTHREAD_SCOPE, () -> vthread.run(task));
this.vthread = vthread;
}
@Override
protected void onPinned(Continuation.Pinned reason) {
Expand Down