aboutsummaryrefslogtreecommitdiff
path: root/src/ppq/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ppq/index.js')
-rw-r--r--src/ppq/index.js34
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) {