Skip to content

Commit

Permalink
Merge pull request #15642 from fengxue-IS/carrier_access
Browse files Browse the repository at this point in the history
Call setContinuation before/after entry
  • Loading branch information
babsingh committed Aug 10, 2022
2 parents 2eedf1b + 3e54a78 commit 0cca472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -39,6 +39,8 @@ public class Continuation {
private boolean started;
private volatile boolean finished;

private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();

/**
* Continuation's Pinned reasons
*/
Expand Down Expand Up @@ -155,7 +157,7 @@ public final void run() {
if (finished) {
throw new IllegalStateException("Continuation has already finished.");
}
/*

Thread carrier = JLA.currentCarrierThread();
Continuation currentContinuation = JLA.getContinuation(carrier);

Expand All @@ -166,7 +168,7 @@ public final void run() {
}

JLA.setContinuation(carrier, this);
*/

boolean result = true;
try {
result = enterImpl();
Expand All @@ -176,10 +178,8 @@ public final void run() {
} else {
/* Continuation yielded */
}
JLA.setContinuation(carrier, parent);
}
/*
JLA.setContinuation(carrier, parent);
*/
}

/**
Expand Down
1 change: 0 additions & 1 deletion runtime/jcl/common/jclcinit.c
Expand Up @@ -595,7 +595,6 @@ initializeRequiredClasses(J9VMThread *vmThread, char* dllName)
#endif /* JAVA_SPEC_VERSION >= 18 */
#if JAVA_SPEC_VERSION >= 19
J9VMCONSTANTPOOL_JAVALANGTHREADFIELDHOLDER,
J9VMCONSTANTPOOL_JDKINTERNALVMCONTINUATION,
#endif /* JAVA_SPEC_VERSION >= 19 */
};

Expand Down

0 comments on commit 0cca472

Please sign in to comment.