You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often feel confused by the fact that the Promise constructor automatically launches the executor function with the next event loop (e.g. by executing process.nextTick()).
The fact that constructing a Promise object is synonymous to "immediately" running the Promise's function body doesn't seem natural to me. The fact that this happens only becomes clear by lack of such a thing like a Promise(...).Start() method.
I believe it should be made clear in the specification that constructing a Promise object automatically runs the Promise's code immediately with the next event loop.
The text was updated successfully, but these errors were encountered:
I often feel confused by the fact that the
Promise
constructor automatically launches the executor function with the next event loop (e.g. by executingprocess.nextTick()
).The fact that constructing a
Promise
object is synonymous to "immediately" running the Promise's function body doesn't seem natural to me. The fact that this happens only becomes clear by lack of such a thing like aPromise(...).Start()
method.I believe it should be made clear in the specification that constructing a
Promise
object automatically runs the Promise's code immediately with the next event loop.The text was updated successfully, but these errors were encountered: