| Modifier and Type | Class and Description |
|---|---|
| public static enum | Continuation.
Reason for pinning |
| public static enum | Continuation.
Preemption attempt result |
| Modifier and Type | Field and Description |
|---|---|
| private Continuation | |
| private boolean | |
| private static final JavaLangAccess | |
| private volatile boolean | |
| private static final long | |
| private Continuation | |
| private boolean | |
| private static final boolean | |
| private final ContinuationScope | |
| private Object[] | |
| private StackChunk | |
| private final Runnable | |
| private static final Unsafe | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public | Continuation(ContinuationScope
the continuation's scope, used in yield scope, Runnable the continuation's body target)Constructs a continuation |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private static Thread | |
| private static native int | |
| private void | |
| private static void | |
| private void | |
| private static native void | |
| private boolean | |
| private void | |
| public static Continuation | Returns: the continuationthe scope scope)Returns the current innermost continuation with the given scope |
| public Continuation | |
| public ContinuationScope | |
| public StackTraceElement[] | |
| private String | |
| private Continuation | |
| public boolean | |
| private boolean | |
| private static boolean | |
| public static boolean | Returns: true if we're in the give scope and are pinned; false otherwisethe continuation scope scope)Tests whether the given scope is pinned. |
| private static native int | |
| public boolean | Returns: whether this unmounted continuation was unmounted by forceful preemptionTests whether this unmounted continuation was unmounted by forceful preemption (a successful tryPreempt) |
| private boolean | |
| private void | |
| protected void | |
| protected void | onPinned(Continuation.
the reason for pinning reasonCalled when suspending if the continuation is pinned |
| private void | |
| public static native void | |
| private static Continuation. | |
| private void | |
| private static native void | |
| public final void | |
| private void | |
| public StackWalker | |
| public StackWalker | Returns: a new StackWalkerthe StackWalker's configuration options optionsCreates a StackWalker for this continuation |
| public StackWalker | Returns: a new StackWalkerthe StackWalker's configuration options options,the delimiting continuation scope for the stack scope)Creates a StackWalker for this continuation and enclosing ones up to the given scope |
| public String | |
| public Continuation. | Returns: the result of the attemptthe thread on which to forcefully preempt this continuation thread)Tries to forcefully preempt this continuation if it is currently mounted on the given thread
Subclasses may throw an |
| private void | |
| public static native void | |
| public static <R> R | |
| public static boolean | Returns: true for success; false for failureThe scope)ContinuationScope to suspendSuspends the current continuations up to the given scope |
| private boolean |
| child | back to summary |
|---|---|
| private Continuation child | |
| done | back to summary |
|---|---|
| private boolean done | |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| mounted | back to summary |
|---|---|
| private volatile boolean mounted | |
| MOUNTED_OFFSET | back to summary |
|---|---|
| private static final long MOUNTED_OFFSET | |
| parent | back to summary |
|---|---|
| private Continuation parent | |
| preempted | back to summary |
|---|---|
| private boolean preempted | |
| PRESERVE_SCOPED_VALUE_CACHE | back to summary |
|---|---|
| private static final boolean PRESERVE_SCOPED_VALUE_CACHE | |
| scope | back to summary |
|---|---|
| private final ContinuationScope scope | |
| scopedValueCache | back to summary |
|---|---|
| private Object[] scopedValueCache | |
| tail | back to summary |
|---|---|
| private StackChunk tail | |
| target | back to summary |
|---|---|
| private final Runnable target | |
| U | back to summary |
|---|---|
| private static final Unsafe U | |
| yieldInfo | back to summary |
|---|---|
| private Object yieldInfo | |
| Continuation | back to summary |
|---|---|
| public Continuation(ContinuationScope scope, Runnable target) Constructs a continuation
| |
| compareAndSetMounted | back to summary |
|---|---|
| private boolean compareAndSetMounted(boolean expectedValue, boolean newValue) | |
| currentCarrierThread | back to summary |
|---|---|
| private static Thread currentCarrierThread() | |
| doYield | back to summary |
|---|---|
private static native int doYield()
| |
| dump | back to summary |
|---|---|
| private void dump() | |
| enter | back to summary |
|---|---|
private static void enter(Continuation c, boolean isContinue)
| |
| enter0 | back to summary |
|---|---|
private void enter0()
| |
| enterSpecial | back to summary |
|---|---|
private static native void enterSpecial(Continuation c, boolean isContinue, boolean isVirtualThread)
| |
| fence | back to summary |
|---|---|
| private boolean fence() | |
| finish | back to summary |
|---|---|
| private void finish() | |
| getCurrentContinuation | back to summary |
|---|---|
| public static Continuation getCurrentContinuation(ContinuationScope scope) Returns the current innermost continuation with the given scope
| |
| getParent | back to summary |
|---|---|
| public Continuation getParent() | |
| getScope | back to summary |
|---|---|
| public ContinuationScope getScope() | |
| getStackTrace | back to summary |
|---|---|
| public StackTraceElement[] getStackTrace() Obtains a stack trace for this unmounted continuation
| |
| id | back to summary |
|---|---|
| private String id() | |
| innermost | back to summary |
|---|---|
| private Continuation innermost() | |
| isDone | back to summary |
|---|---|
| public boolean isDone() Tests whether this continuation is completed
| |
| isEmpty | back to summary |
|---|---|
| private boolean isEmpty() | |
| isEmptyOrTrue | back to summary |
|---|---|
| private static boolean isEmptyOrTrue(String property) | |
| isPinned | back to summary |
|---|---|
| public static boolean isPinned(ContinuationScope scope) Tests whether the given scope is pinned. This method is slow.
| |
| isPinned0 | back to summary |
|---|---|
| private static native int isPinned0(ContinuationScope scope) | |
| isPreempted | back to summary |
|---|---|
| public boolean isPreempted() Tests whether this unmounted continuation was unmounted by forceful preemption (a successful tryPreempt)
| |
| isStarted | back to summary |
|---|---|
| private boolean isStarted() | |
| mount | back to summary |
|---|---|
| private void mount() | |
| onContinue | back to summary |
|---|---|
| protected void onContinue() Called when the continuation continues | |
| onPinned | back to summary |
|---|---|
| protected void onPinned(Continuation. Called when suspending if the continuation is pinned
| |
| onPinned0 | back to summary |
|---|---|
| private void onPinned0(int reason) | |
| pin | back to summary |
|---|---|
| public static native void pin() Pins the current continuation (enters a critical section). This increments an internal semaphore that, when greater than 0, pins the continuation.
| |
| pinnedReason | back to summary |
|---|---|
| private static Continuation. | |
| postYieldCleanup | back to summary |
|---|---|
| private void postYieldCleanup() | |
| registerNatives | back to summary |
|---|---|
| private static native void registerNatives() | |
| run | back to summary |
|---|---|
| public final void run() Mounts and runs the continuation body. If suspended, continues it from the last suspend point. | |
| setMounted | back to summary |
|---|---|
| private void setMounted(boolean newValue) | |
| stackWalker | back to summary |
|---|---|
| public StackWalker stackWalker() Creates a StackWalker for this continuation
| |
| stackWalker | back to summary |
|---|---|
| public StackWalker stackWalker(Set<StackWalker. Creates a StackWalker for this continuation
| |
| stackWalker | back to summary |
|---|---|
| public StackWalker stackWalker(Set<StackWalker. Creates a StackWalker for this continuation and enclosing ones up to the given scope
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| tryPreempt | back to summary |
|---|---|
| public Continuation. Tries to forcefully preempt this continuation if it is currently mounted on the given thread
Subclasses may throw an
| |
| unmount | back to summary |
|---|---|
| private void unmount() | |
| unpin | back to summary |
|---|---|
| public static native void unpin() Unpins the current continuation (exits a critical section).
This decrements an internal semaphore that, when equal 0, unpins the current continuation
if pinned with
| |
| wrapWalk | back to summary |
|---|---|
| public static <R> R wrapWalk(Continuation inner, ContinuationScope scope, Supplier<R> walk) | |
| yield | back to summary |
|---|---|
| public static boolean yield(ContinuationScope scope) Suspends the current continuations up to the given scope
| |
| yield0 | back to summary |
|---|---|
private boolean yield0(ContinuationScope scope, Continuation child)
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Continuation. | CRITICAL_SECTION
In critical section |
| public static final Continuation. | EXCEPTION
Exception (OOME/SOE) |
| public static final Continuation. | NATIVE
Native frame on stack |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Continuation. | |
| public static Continuation. |
| CRITICAL_SECTION | back to summary |
|---|---|
| public static final Continuation. In critical section | |
| EXCEPTION | back to summary |
|---|---|
| public static final Continuation. Exception (OOME/SOE) | |
| NATIVE | back to summary |
|---|---|
| public static final Continuation. Native frame on stack | |
| Pinned | back to summary |
|---|---|
| private Pinned() | |
| valueOf | back to summary |
|---|---|
| public static Continuation. | |
| values | back to summary |
|---|---|
| public static Continuation. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Continuation. | PERM_FAIL_NOT_MOUNTED
Permanent failure: continuation not mounted on the thread |
| public static final Continuation. | PERM_FAIL_UNSUPPORTED
Permanent failure |
| public static final Continuation. | PERM_FAIL_YIELDING
Permanent failure: continuation already yielding |
| pack-priv final Continuation. | |
| public static final Continuation. | SUCCESS
Success |
| public static final Continuation. | TRANSIENT_FAIL_PINNED_CRITICAL_SECTION
Transient failure: continuation pinned due to a held CS |
| public static final Continuation. | TRANSIENT_FAIL_PINNED_NATIVE
Transient failure: continuation pinned due to native frame |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Continuation. | Returns: whether or not the continuation is pinnedWhether or not the continuation is pinned. |
| public static Continuation. | |
| public static Continuation. |
| PERM_FAIL_NOT_MOUNTED | back to summary |
|---|---|
| public static final Continuation. Permanent failure: continuation not mounted on the thread | |
| PERM_FAIL_UNSUPPORTED | back to summary |
|---|---|
| public static final Continuation. Permanent failure | |
| PERM_FAIL_YIELDING | back to summary |
|---|---|
| public static final Continuation. Permanent failure: continuation already yielding | |
| pinned | back to summary |
|---|---|
| pack-priv final Continuation. | |
| SUCCESS | back to summary |
|---|---|
| public static final Continuation. Success | |
| TRANSIENT_FAIL_PINNED_CRITICAL_SECTION | back to summary |
|---|---|
| public static final Continuation. Transient failure: continuation pinned due to a held CS | |
| TRANSIENT_FAIL_PINNED_NATIVE | back to summary |
|---|---|
| public static final Continuation. Transient failure: continuation pinned due to native frame | |
| PreemptStatus | back to summary |
|---|---|
| private PreemptStatus(Continuation. | |
| pinned | back to summary |
|---|---|
| public Continuation. Whether or not the continuation is pinned.
| |
| valueOf | back to summary |
|---|---|
| public static Continuation. | |
| values | back to summary |
|---|---|
| public static Continuation. | |