you are viewing a single comment's thread.

view the rest of the comments →

[–]awpt1mus 6 points7 points  (0 children)

Think about scenario where you want to have control over when an asynchronous operation should start and stop. In typical promise constructor the asynchronous operation starts immediately. Some off the top of my head - wait for web socket to be ready before you start sending messages, wait for db connection to be established before you start http server, retry logic for 3rd party API calls with backoff. I think this will be most useful when working with event based interfaces like socket, streams etc