aboutsummaryrefslogtreecommitdiff
path: root/src/ppq/index.js
diff options
context:
space:
mode:
authorTom Harley2018-04-26 05:05:49 +0100
committerTom Harley2018-04-26 05:05:49 +0100
commitf0331e27eab9e699529183b0dc2dd1bc9599aea5 (patch)
treec7c09b1d77006bf7aceb7c3bf1c23910c9a55168 /src/ppq/index.js
parentMiscellaneous minor fixes (diff)
parentpushing for tom to get changes (diff)
downloadmedicine-f0331e27eab9e699529183b0dc2dd1bc9599aea5.tar.gz
medicine-f0331e27eab9e699529183b0dc2dd1bc9599aea5.zip

Merge branch ‘trh/gets’ of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/project-code into trh/gets

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) {