director.wait();
}
}
if (_successfulBranch == -1) {
// Conditional construct was ended prematurely
throw new TerminateProcessException(((Nameable) getParent())
.getName()
+ ": exiting conditional"
+ " branching due to TerminateProcessException.");
}
_threadList = null;
// Is it necessary to copy this? Note the finally clause below.
int result = _successfulBranch;
if (_debugging) {
_debug("** Succeessful branch: " + result);
}
return result;
} catch (InterruptedException ex) {
throw new TerminateProcessException(((Nameable) getParent())
.getName()
+ ".chooseBranch interrupted.");
} finally {
_branches = null;
_successfulBranch = -1;