The way things are queued using setTimeout is exactly the same as the queue. If two callbacks are queued with the same βdelayβ, the queue that was queued will be executed first.
Edit: I did not understand the original intention of OP.
The 'branching' promises are what really happens here. The value is then-capable, which is referenced in the first set of then-ables (for a and b), the two provided callbacks are triggered at the same time, because they both refer to the same promise, however, the hard bit is that they are executed in the order in which they were queued using the .then(...) object of the enabling promise.
Then the next / subsequent callbacks are queued in their respective orders (c and d).
To answer the question directly: None. The nature of asynchronous actions in that case could be anything. However, the features provided in OP-ables are essentially synchronous, which leads to an intuitive, but completely misleading logging order.
The dembinski
source share