summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
2fbeec6)
gitlab #666
Change-Id: I1c251c99a99302eb765fb7bb2c6be383fe417573
public boolean isStopped() {
synchronized (this) {
public boolean isStopped() {
synchronized (this) {
- return stopped || (scheduledNextStep.isEmpty() && scheduledAt.isEmpty());
SCLContext context = SCLContext.getCurrent();
Object oldActionContext = context.put("sequenceAction", this);
try {
SCLContext context = SCLContext.getCurrent();
Object oldActionContext = context.put("sequenceAction", this);
try {
- Task firstTask = scheduledAt.peek();
while(true) {
while(!scheduledNow.isEmpty()) {
try {
while(true) {
while(!scheduledNow.isEmpty()) {
try {
this.exceptions.add(new RuntimeException("Action failure at " + currentTime + ": " + e.getMessage(), e));
}
}
this.exceptions.add(new RuntimeException("Action failure at " + currentTime + ": " + e.getMessage(), e));
}
}
+ Task firstTask = scheduledAt.peek();
+ if(firstTask == null) {
+ if (scheduledNextStep.isEmpty())
+ stopped = true;
return Double.POSITIVE_INFINITY;
return Double.POSITIVE_INFINITY;
- else if(firstTask.time > currentTime+TIME_TOLERANCE)
+ } else if(firstTask.time > currentTime+TIME_TOLERANCE) {
+ } else {
+ scheduledAt.remove();
firstTask.continuation.apply(Tuple0.INSTANCE);
firstTask.continuation.apply(Tuple0.INSTANCE);
- synchronized (this) {
- scheduledAt.remove();
- }
- firstTask = scheduledAt.peek();