Skip to content

Commit

Permalink
domain test with node failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Gruenbaum authored and Benjamin Gruenbaum committed Feb 13, 2015
1 parent 8626544 commit ca28f9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Binary file added .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions nodetest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var q = require("./q/index.js");

q.reject("Heh");

process.on("unhandledRejection", function(handler, reason){
console.log("Found it!", handler, reason);
});
6 changes: 3 additions & 3 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var nextTick =(function () {
head.domain = void 0;
domain.enter();
}
runSingle(task);
runSingle(task, domain);

}
while(laterQueue.length){
Expand All @@ -116,8 +116,8 @@ var nextTick =(function () {
}
flushing = false;
}

function runSingle(task){ // runs a single function in the async queue
// runs a single function in the async queue
function runSingle(task, domain){
try {
task();

Expand Down

0 comments on commit ca28f9b

Please sign in to comment.