public class Co
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<CoArm> |
arms |
Constructor and Description |
---|
Co(CoArm firstArm,
CoArm... restArms)
Create a new instance of an Co.
|
Modifier and Type | Method and Description |
---|---|
private void |
createCo(CoArm firstArm,
CoArm... restArms)
Common code called from constructors to create a new instance of an Co.
|
BaseArmCode.Control |
go()
Execute this co.
|
private void |
oneCoArm(CoArm a,
int armCount)
Handle one abstract arm for this Co.
|
java.util.ArrayList<CoArm> arms
private void createCo(CoArm firstArm, CoArm... restArms)
firstArm
- The first arm.restArms
- Any other arms.private void oneCoArm(CoArm a, int armCount)
a
- The arm.armCount
- The arm's number (0-based).public BaseArmCode.Control go()
COCALL
invocation completes when get reply from invoked operation.
A COSEND
invocation completes immediately after invocation is sent.
As each invocation completes, execute the associated arm's
code ("post-processing code", aka PPC);
continue doing so until all invocations have
or a PPC executes the equivalent of a break
or return
.