Comparing version 1.9.0 to 1.10.0
{ | ||
"name": "fastq", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "Fast, in memory work queue", | ||
@@ -39,3 +39,3 @@ "main": "queue.js", | ||
"pre-commit": "^1.2.2", | ||
"snazzy": "^8.0.0", | ||
"snazzy": "^9.0.0", | ||
"standard": "^15.0.0", | ||
@@ -42,0 +42,0 @@ "tape": "^5.0.0", |
@@ -12,2 +12,6 @@ 'use strict' | ||
if (concurrency < 1) { | ||
throw new Error('fastqueue concurrency must be greater than 1') | ||
} | ||
var cache = reusify(Task) | ||
@@ -14,0 +18,0 @@ var queueHead = null |
@@ -7,4 +7,3 @@ # fastq | ||
Fast, in memory work queue. `fastq` is API compatible with | ||
[`async.queue`](https://github.com/caolan/async#queueworker-concurrency) | ||
Fast, in memory work queue. | ||
@@ -11,0 +10,0 @@ Benchmarks (1 million tasks): |
@@ -6,2 +6,12 @@ 'use strict' | ||
test('concurrency', function (t) { | ||
t.plan(2) | ||
t.throws(buildQueue.bind(null, worker, 0)) | ||
t.doesNotThrow(buildQueue.bind(null, worker, 1)) | ||
function worker (arg, cb) { | ||
cb(null, true) | ||
} | ||
}) | ||
test('worker execution', function (t) { | ||
@@ -8,0 +18,0 @@ t.plan(3) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27419
736
208