Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Implement unhandled rejection tracking for promises #109

Closed
fengmk2 opened this issue Feb 25, 2015 · 10 comments
Closed

Implement unhandled rejection tracking for promises #109

fengmk2 opened this issue Feb 25, 2015 · 10 comments
Labels

Comments

@fengmk2
Copy link
Contributor

fengmk2 commented Feb 25, 2015

nodejs/node#758

https://gist.github.com/benjamingr/0237932cee84712951a2

@mattma
Copy link
Contributor

mattma commented Feb 25, 2015

I agreed with what the author said. It should be added to Promise A+ specs. 这个是很多Promise libraries (like bluebird, q, rsvp, etc) 都遵守的守则.

Promise 还有另外一个致命的问题,就是无法取消正在运行中的 Promise,很多用户都提出了质疑,但是看来没有任何解决办法. 我自己也问过很多 JS and Node.js 牛人, 结果是无解。

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 25, 2015

嗯,我一直不太喜欢 Promise。。

@285858315
Copy link

不知道Dart是不是也有类似的问题?

@willin
Copy link

willin commented Feb 26, 2015

why? Promise原则解决了很多问题啊

@popomore
Copy link
Contributor

es7 很多实现都基于 promise,还是逃不了

@magicdawn
Copy link

@mattma 看看 Mozila 出的Task.js,可以取消正在运行的Task

Promise的abort 可以用 reject 模拟吗,例如reject (new AbortError)

@XadillaX
Copy link
Contributor

XadillaX commented Mar 9, 2015

我还是比较喜欢旧式的回调机制。

@gxcsoccer
Copy link

有了generator后就没用过promise

@magicdawn
Copy link

@gxcsoccer
Copy link

@magicdawn 明白你的意思,我是说接口层面的

@fengmk2 fengmk2 closed this as completed May 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants