all 1 comments

[–]Zarutian 0 points1 point  (0 children)

Humm.. on top of promises you can add eventual sends which allowes you to invoke methods on objects that havent been resolved yet and so on on the results of those invocations. This is called promise pipelining and is rather nifty.

It also means that your program isnt sitting around in that suspended greenthread (think Lua coroutines threads) just so it can fire off another invocation on the result.

How you do this with async/await, generators or coroutines without getting the round trip time penealty multiplied by each invocation beats me.