Yad Smood (2015-08-03T06:08:06.000Z)
y.s.inside at gmail.com (2015-08-03T08:05:04.692Z)
I have thought about something similar before, and used it in one of my libs. Recently, I have come up another idea, it was already implemented on Yaku: ```js let Promise = require('yaku') // The `self` is the instance of the newly created promise.let p = new Promise((resolve, reject, self) => { let tmr = setTimeout(resolve, 3000) let self.abort = () => { clearTimeout(tmr) reject(new Error('abort promise')) } }) p.abort() ``` The origin post is here: https://github.com/promises-aplus/cancellation-spec/issues/16. what do you think about it? 2015年8月3日(月) 8:43 Glen Huang <curvedmark at gmail.com>: