Re: Out of order execution

2016-06-16 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 16 June 2016 at 01:57:19 UTC, Joerg Joergonson wrote: Is there an efficient lazy way to make this happen? No, I don't see how that would work. Suppose I can't run the loop twice for performance reasons(there is other stuff in it) and I don't want to store the state and call info

Re: Out of order execution

2016-06-16 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 16 June 2016 at 01:57:19 UTC, Joerg Joergonson wrote: Suppose I have a loop where I execute two functions: for(...) { if (x) Do1(x); if (y) Do2(y); } The problem is, I really always want to execute all the Do2's first then the Do1's. As is, we could get any order of calls.

Out of order execution

2016-06-15 Thread Joerg Joergonson via Digitalmars-d-learn
Suppose I have a loop where I execute two functions: for(...) { if (x) Do1(x); if (y) Do2(y); } The problem is, I really always want to execute all the Do2's first then the Do1's. As is, we could get any order of calls. Suppose I can't run the loop twice for performance reasons(there i