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
In the following code, resource 2 is not disposed at all with bluebird versions > 2.4.3:
varBPromise=require('bluebird');functionworkingGetResource(){returnBPromise.resolve(1).then(function(x){console.log('Providing resource',x);returnBPromise.resolve(x)}).disposer(function(y){console.log('Disposing resource',y);})}functionfailingGetResource(){returnBPromise.resolve(2).then(function(x){returnBPromise.resolve(x).then(function(y){console.log('Providing resource',y);returny})}).disposer(function(z){console.log('Disposing resource',z);})}BPromise.using(workingGetResource(),function(r){console.log('Using resource',r)}).then(function(){returnBPromise.using(failingGetResource(),function(r){console.log('Using resource '+r+' that is only disposed when bluebird <= 2.4.2')})});
The text was updated successfully, but these errors were encountered:
In the following code, resource 2 is not disposed at all with bluebird versions > 2.4.3:
The text was updated successfully, but these errors were encountered: