promise-stream-queue
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -0,0 +0,0 @@ const Stream = require('../main.js'); |
@@ -0,0 +0,0 @@ const |
17
item.js
@@ -77,10 +77,15 @@ function Item(id,pr,timeout) { | ||
this.pr.then(thenhdl,errhdl).catch(catchhdl); | ||
if(this.timeout>0) { | ||
to = setTimeout(()=>{ | ||
self.kill("Promise timeout"); | ||
},this.timeout); | ||
}; | ||
if(this.pr.then) { | ||
this.pr.then(thenhdl,errhdl).catch(catchhdl); | ||
if(this.timeout>0) { | ||
to = setTimeout(()=>{ | ||
self.kill("Promise timeout"); | ||
},this.timeout); | ||
}; | ||
} | ||
else { | ||
thenhdl(this.pr); | ||
} | ||
} | ||
module.exports = Item; |
@@ -0,0 +0,0 @@ const |
{ | ||
"name": "promise-stream-queue", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Promise Stream. Queue promises and retrieve the resolved/rejected ones in the inserted order", | ||
@@ -5,0 +5,0 @@ "author": "David Gómez Matarrodona <solzimer@gmail.com>", |
@@ -0,0 +0,0 @@ # promise-stream-queue |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
211
12012