Non deterministic handler chain

78 Views Asked by At

In this video at 12:14 the demonstrator explains control flow problem with Groovy where we don't know the order of executions for the lines 1,2,3,4. The slide is like below. I don't understand why it is said that (2) can happen before or after 3,4. If 2 is a promise then 3 will definitely happen after 2 and 2 will definitely happen before 3. Can someone explain this or provide example where then part happens before the promise is completed?

enter image description here

0

There are 0 best solutions below