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

Commit

Permalink
Merge pull request #87 from fengxue-IS/16855
Browse files Browse the repository at this point in the history
(0.37) Initialize Continuation.vthread in constructor
  • Loading branch information
babsingh authored Apr 3, 2023
2 parents a011c19 + 6f8b7a6 commit d9897f7
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit d9897f7

Please sign in to comment.