Down for Maintenance from December 09, 2025 Tuesday 9:30pm PST to December 10, 2025 Wednesday 3:30am PST (i.e., 05:30am -11:30am GMT, December 10, 2025 Wednesday)
- Loading...
...
The current API looks like the following Javadoc style documentation.
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
/**
* The Continuation class. The API design is still in progress.
*/
class Continuation {
/**
* Marks the beginning of a new 'scope' in preparation for stack
* save/resume. Executes the given Runnable.
*
* @param data any user defined data to be passed from this call
* site to the point where {@link #resume} is called
* for convenience.
* @return the Continuation object after the scope was saved
* into a Continuation object or null if it wasn't and
* simply returned
*/
public static Object enter(Runnable r, Object data);
/**
* Copies the stack frames in the current scope, and stores them
* in this object. This method must be called in an enclosing
* scope. Calling this method causes the stack frames in the
* scope to suspend (including the current frame) and the enter
* call at the entry of the current scope to return.
*
* @return the parameter passed to the resume call when the saved stack
* frames are resumed in the future.
*/
public Object save();
/**
* Reactivates the stack frames saved in this object on the
* current thread. Overwrites the stack frames in the current
* scope with the saved stack frames. This method must be
* called in an enclosing scope. Calling this method causes the
* suspended save call to resume from the point where it was
* suspended.
*
* @param rv the value to be returned from the resumed save call site.
*/
public void resume(Object rv);
}
|
...