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 [EMAIL PROTECTED] Continuation} object from the specified 
[EMAIL PROTECTED] Runnable}
+     * object.
+     *
+     * <p>
+     * Unlike the [EMAIL PROTECTED] #startWith(Runnable)} method, this method 
doesn't actually
+     * execute the <tt>Runnable</tt> object. It will be executed when
+     * it's [EMAIL PROTECTED] #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 [EMAIL PROTECTED] Runnable} object in an 
environment
      * that allows [EMAIL PROTECTED] Continuation#suspend()}.
      *



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to