use of org.wso2.ballerinalang.compiler.tree.statements.BLangForkJoin in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addTimeoutCause.
public void addTimeoutCause(Set<Whitespace> ws, String identifier) {
BLangForkJoin forkJoin = (BLangForkJoin) this.forkJoinNodesStack.peek();
forkJoin.timeoutBody = (BLangBlockStmt) this.blockNodeStack.pop();
forkJoin.timeoutExpression = (BLangExpression) this.exprNodeStack.pop();
Set<Whitespace> varWS = removeNthFromLast(ws, 3);
forkJoin.addWS(ws);
forkJoin.timeoutVariable = (BLangVariable) this.generateBasicVarNode((DiagnosticPos) this.typeNodeStack.peek().getPosition(), varWS, identifier, false);
}
use of org.wso2.ballerinalang.compiler.tree.statements.BLangForkJoin in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addJoinCondition.
public void addJoinCondition(Set<Whitespace> ws, String joinType, List<String> workerNames, int joinCount) {
BLangForkJoin forkJoin = (BLangForkJoin) this.forkJoinNodesStack.peek();
forkJoin.joinedWorkerCount = joinCount;
forkJoin.joinType = ForkJoinNode.JoinType.valueOf(joinType);
forkJoin.addWS(ws);
workerNames.forEach(s -> forkJoin.joinedWorkers.add((BLangIdentifier) createIdentifier(s)));
}
Aggregations