I have a scenario where multiple events are triggered in parallel and have different timespans, and for this I have to check some conditions and print the result of the events. How to achieve this without causing delays. The condition should not wait to finish one event to get the result and then to pass to the other, but for each event that finished to print the result. Below is a snippet of my code but as it seems does not proceed in parallel but in sequence I want to execute for a block of events. Any help/opinion highly appreciated!
def flag=0;
while (jobs.isBuilding()== true ){
if (flag ==0 ){
println(jobs.name+ ": build started and is running...")}
flag=1;
}
if (jobs.isBuilding()== false){
println(jobs.name + ": build completed and the result is " + build.getResult())
}
Aucun commentaire:
Enregistrer un commentaire