3 回答

TA貢獻1752條經(jīng)驗 獲得超4個贊
是這樣嗎?
是
有沒有人考慮過以這種方式構(gòu)建鏈的記憶問題?
Promise.each
then
記憶消耗在承諾庫之間會有所不同嗎?
是的,非常重要。

TA貢獻1818條經(jīng)驗 獲得超11個贊
then
catch
catch
function foo() { function doo() { // always return a promise if (/* more to do */) { return doSomethingAsync().then(function(){ throw "next"; }).catch(function(err) { if (err == "next") doo(); }) } else { return Promise.resolve(); } } return doo(); // returns a promise}
添加回答
舉報