Example usage for org.apache.commons.javaflow Continuation suspend

List of usage examples for org.apache.commons.javaflow Continuation suspend

Introduction

In this page you can find the example usage for org.apache.commons.javaflow Continuation suspend.

Prototype

public static Object suspend() 

Source Link

Document

Stops the running continuation.

Usage

From source file:com.topekalabs.bigmachine.lib.testutils.SimpleContinuationRunnable.java

@Override
public void run() {
    MutableInt val = (MutableInt) Continuation.getContext();
    val.setValue(FIRST_VALUE);
    count = SECOND_VALUE;//from w  ww. j  a  va  2s.  co  m

    Continuation.suspend();

    val = (MutableInt) Continuation.getContext();
    val.setValue(count);
}

From source file:org.shelloid.netverif.TestRunnable.java

private void echo(int x) {
    System.out.println(x);
    Continuation.suspend();
}