use of es.bsc.compss.scheduler.exceptions.ActionNotWaitingException in project compss by bsc-wdc.
the class ResourceScheduler method tryToLaunchBlockedActions.
/**
* Tries to launch blocked actions on resource. When an action cannot be launched, its successors are not tried
*/
@SuppressWarnings("unchecked")
public final void tryToLaunchBlockedActions() {
LOGGER.debug("[ResourceScheduler] Try to launch blocked actions on resource " + getName());
while (this.hasBlockedActions()) {
AllocatableAction firstBlocked = this.getFirstBlocked();
Implementation selectedImplementation = firstBlocked.getAssignedImplementation();
if (!firstBlocked.isToReserveResources() || myWorker.canRunNow((T) selectedImplementation.getRequirements())) {
try {
firstBlocked.resumeExecution();
this.removeFirstBlocked();
} catch (ActionNotWaitingException anwe) {
// Not possible. If the task is in blocked list it is waiting
}
} else {
break;
}
}
}
Aggregations