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
passing createTmpDelayed() to Promise.using has a different outcome than passing createTmp().
This is not expected, as usually the bluebird API allows passing promises resolving to instances of a class, when the function expects a specific class. For example, .bind allows to pass promises that will be resolved to the object that will be binded.
Also, there is no way currently to write createTmpDelayed in such a way so as to transform the promise into a disposer.
createTmpDelayed=function(){returnPromise.delay(1000).then(function(){returncreateTmp();}).dispose(function(disposer){disposer.dispose();// no such documented function});};
This makes it impossible to make generic functions that return Promises that resolve to disposers.
The text was updated successfully, but these errors were encountered:
Right now,
Promise.using
accepts onlyDisposer
instances but not promises that resolve to disposers.For example in this code:
passing createTmpDelayed() to Promise.using has a different outcome than passing createTmp().
This is not expected, as usually the bluebird API allows passing promises resolving to instances of a class, when the function expects a specific class. For example,
.bind
allows to pass promises that will be resolved to the object that will be binded.Also, there is no way currently to write createTmpDelayed in such a way so as to transform the promise into a disposer.
This makes it impossible to make generic functions that return Promises that resolve to disposers.
The text was updated successfully, but these errors were encountered: