Comparing version 1.18.0 to 1.19.0
@@ -23,2 +23,3 @@ declare function fastq<C, T = any, R = any>(context: C, worker: fastq.worker<C, T, R>, concurrency: number): fastq.queue<T, R> | ||
concurrency: number | ||
readonly paused: boolean | ||
drain(): any | ||
@@ -25,0 +26,0 @@ empty: () => void |
{ | ||
"name": "fastq", | ||
"version": "1.18.0", | ||
"version": "1.19.0", | ||
"description": "Fast, in memory work queue", | ||
@@ -5,0 +5,0 @@ "main": "queue.js", |
@@ -237,2 +237,8 @@ # fastq | ||
------------------------------------------------------- | ||
<a name="paused"></a> | ||
### queue.paused | ||
Property (Read-Only) that returns `true` when the queue is in a paused state. | ||
------------------------------------------------------- | ||
<a name="drain"></a> | ||
@@ -239,0 +245,0 @@ ### queue.drain |
@@ -643,1 +643,12 @@ 'use strict' | ||
}) | ||
test('paused flag', function (t) { | ||
t.plan(2) | ||
var queue = buildQueue(function (arg, cb) { | ||
cb(null) | ||
}, 1) | ||
t.equal(queue.paused, false) | ||
queue.pause() | ||
t.equal(queue.paused, true) | ||
}) |
43854
1162
313