You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ko...@apache.org on 2005/08/16 05:53:37 UTC
svn commit: r232929 -
/jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java
Author: kohsuke
Date: Mon Aug 15 20:53:33 2005
New Revision: 232929
URL: http://svn.apache.org/viewcvs?rev=232929&view=rev
Log:
implemented the startSuspendedWIth method
Modified:
jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java
Modified: jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java?rev=232929&r1=232928&r2=232929&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/Continuation.java Mon Aug 15 20:53:33 2005
@@ -74,6 +74,22 @@
}
/**
+ * Creates a new {@link Continuation} object from the specified {@link Runnable}
+ * object.
+ *
+ * <p>
+ * Unlike the {@link #startWith(Runnable)} method, this method doesn't actually
+ * execute the <tt>Runnable</tt> object. It will be executed when
+ * it's {@link #continueWith(Continuation) continued}.
+ *
+ * @return
+ * always return a non-null valid object.
+ */
+ public static Continuation startSuspendedWith( final Runnable target ) {
+ return new Continuation(new StackRecorder(target));
+ }
+
+ /**
* Starts executing the specified {@link Runnable} object in an environment
* that allows {@link Continuation#suspend()}.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org