mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
279 B
13 lines
279 B
15 years ago
|
process.mixin(require('./common'));
|
||
|
|
||
|
var promise = new process.Promise();
|
||
|
var cancelled = false;
|
||
|
promise.addCancelback(function(){
|
||
|
if(cancelled){
|
||
|
assertUnreachable("promise should not cancel more than once");
|
||
|
}
|
||
|
cancelled = true;
|
||
|
});
|
||
|
promise.cancel();
|
||
|
promise.cancel();
|