java - Are you able to call 3 for loops in a specific order? -
at moment have 3 loops, possible call them 1 time instead of 3? problem lies in fact loop 1 has finished before loop 2 can work, , loop 2 has finished before loop 3 can run. @ moment it's this.
public void handling() { (object object : code.objects) { handle_one(object); } (object object : code.objects) { handle_two(object); } (object object : code.objects) { handle_three(object); } }
if try doesn't work because being called @ same time , has ordered.
public void handling() { //code doesn't work... (object object : code.objects) { handle_one(object); handle_two(object); handle_three(object); } }
is there way around this, way fix it? have been trying while , nothing...having 3 loops bad in situation , causing problems. (and sadly way can working)
edit: reason bad in case because loop can reach 300 sometimes. (as code.objects, represents how many connections there are, 100, meaning it's doing 300 loops per iteration.
you can use swigutilities.invokeandwait(<your task>
). please refer following link
Comments
Post a Comment