diff options
author | Alexander Early <alexander.early@gmail.com> | 2017-04-06 22:34:11 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2017-04-06 22:34:11 -0700 |
commit | 291c81138258cd22be3a9bc9b2f1990eacaba634 (patch) | |
tree | 03405c706a6a542fb395bc68844d3a63b73a5bc7 /lib/queue.js | |
parent | 3dc9f8f1e120f0c95f67221ac0d1a9bac7b88cd4 (diff) | |
download | async-291c81138258cd22be3a9bc9b2f1990eacaba634.tar.gz |
add queue.removelinked-list-methods
Diffstat (limited to 'lib/queue.js')
-rw-r--r-- | lib/queue.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/queue.js b/lib/queue.js index 906467c..2d0abb7 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -24,6 +24,12 @@ import wrapAsync from './internal/wrapAsync'; * task in the list. Invoke with `queue.push(task, [callback])`, * @property {Function} unshift - add a new task to the front of the `queue`. * Invoke with `queue.unshift(task, [callback])`. + * @property {Function} remove - remove items from the queue that match a test + * function. The test function will be passed an object with a `data` property, + * and a `priority` property, if this is a + * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. + * Invoked with `queue.remove(testFn)`, where `testFn` is of the form + * `function ({data, priority}) {}` and returns a Boolean. * @property {Function} saturated - a callback that is called when the number of * running workers hits the `concurrency` limit, and further tasks will be * queued. |