summaryrefslogtreecommitdiff
path: root/lib/internal/queue.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/queue.js')
-rw-r--r--lib/internal/queue.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/queue.js b/lib/internal/queue.js
index e3887cb..41d6c90 100644
--- a/lib/internal/queue.js
+++ b/lib/internal/queue.js
@@ -15,7 +15,7 @@ export default function queue(worker, concurrency, payload) {
throw new Error('Concurrency must not be zero');
}
- function _insert(data, pos, callback) {
+ function _insert(data, insertAtFront, callback) {
if (callback != null && typeof callback !== 'function') {
throw new Error('task callback must be a function');
}
@@ -35,7 +35,7 @@ export default function queue(worker, concurrency, payload) {
callback: callback || noop
};
- if (pos) {
+ if (insertAtFront) {
q._tasks.unshift(item);
} else {
q._tasks.push(item);