diff options
| author | cjd24 | 2018-04-26 03:13:52 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-26 03:13:52 +0100 |
| commit | 60576c0b58907d48cffcb79ec023e7afaa5a509b (patch) | |
| tree | 5a28023c784dd4271e699db50bdc2f021d59f9d8 /src/ppq/index.js | |
| parent | small fixes of fs.unlink and paths passed to c (diff) | |
| download | medicine-60576c0b58907d48cffcb79ec023e7afaa5a509b.tar.gz medicine-60576c0b58907d48cffcb79ec023e7afaa5a509b.zip | |
Fixing the threading issue with vips, should be ready for server deployment
Diffstat (limited to 'src/ppq/index.js')
| -rw-r--r-- | src/ppq/index.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ppq/index.js b/src/ppq/index.js index ec2f188..84d2b7e 100644 --- a/src/ppq/index.js +++ b/src/ppq/index.js @@ -19,23 +19,23 @@ class PromisePriorityQueue { if (config.concurrent) this.concurrent = config.concurrent; } - // enqueue(i, p, t, ...args) { - // return p.bind(t)(...args); - // } - - enqueue(i, p, t, ...argv) { - this.size++; - return new Promise((res, rej) => { - this.queues[i-1].push( - [ - p.bind(t, ...argv), - res, - rej - ] - ); - this.run(); - }); - }; + enqueue(i, p, t, ...args) { + return p.bind(t)(...args); + } + + // enqueue(i, p, t, ...argv) { + // this.size++; + // return new Promise((res, rej) => { + // this.queues[i-1].push( + // [ + // p.bind(t, ...argv), + // res, + // rej + // ] + // ); + // this.run(); + // }); + // }; dequeue() { for (let i = 0; i < this.least; ++i) { |
