diff options
Diffstat (limited to 'lib/internal/queue.js')
-rw-r--r-- | lib/internal/queue.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/internal/queue.js b/lib/internal/queue.js index 479eaf8..87d49f4 100644 --- a/lib/internal/queue.js +++ b/lib/internal/queue.js @@ -102,6 +102,11 @@ export default function queue(worker, concurrency, payload) { unshift: function (data, callback) { _insert(data, true, callback); }, + remove: function (testFn) { + q._tasks = q._tasks.filter(function (node) { + return !testFn(node); + }) + }, process: function () { // Avoid trying to start too many processing operations. This can occur // when callbacks resolve synchronously (#1267). |