@stdlib/utils-parallel 0.0.3 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +25 -2
- package/bin/cli +1 -1
- package/lib/node/exec.js +2 -2
- package/package.json +6 -4
- package/CHANGELOG.md +0 -5
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2022 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
# Parallel
|
|
22
22
|
|
|
23
|
-
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
|
|
23
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
24
24
|
|
|
25
25
|
> Execute scripts in parallel.
|
|
26
26
|
|
|
@@ -329,6 +329,8 @@ npm install -g @stdlib/utils-parallel
|
|
|
329
329
|
|
|
330
330
|
</section>
|
|
331
331
|
|
|
332
|
+
<!-- CLI usage documentation. -->
|
|
333
|
+
|
|
332
334
|
<section class="usage">
|
|
333
335
|
|
|
334
336
|
### Usage
|
|
@@ -369,6 +371,16 @@ $ parallel --cmd 'node' --workers 4 --concurrency 8 ./1.js ./2.js ./3.js ./4.js
|
|
|
369
371
|
|
|
370
372
|
<!-- /.cli -->
|
|
371
373
|
|
|
374
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
375
|
+
|
|
376
|
+
<section class="related">
|
|
377
|
+
|
|
378
|
+
</section>
|
|
379
|
+
|
|
380
|
+
<!-- /.related -->
|
|
381
|
+
|
|
382
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
383
|
+
|
|
372
384
|
|
|
373
385
|
<section class="main-repo" >
|
|
374
386
|
|
|
@@ -393,7 +405,7 @@ See [LICENSE][stdlib-license].
|
|
|
393
405
|
|
|
394
406
|
## Copyright
|
|
395
407
|
|
|
396
|
-
Copyright © 2016-
|
|
408
|
+
Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
397
409
|
|
|
398
410
|
</section>
|
|
399
411
|
|
|
@@ -412,9 +424,20 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
412
424
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-parallel/main.svg
|
|
413
425
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-parallel?branch=main
|
|
414
426
|
|
|
427
|
+
<!--
|
|
428
|
+
|
|
415
429
|
[dependencies-image]: https://img.shields.io/david/stdlib-js/utils-parallel.svg
|
|
416
430
|
[dependencies-url]: https://david-dm.org/stdlib-js/utils-parallel/main
|
|
417
431
|
|
|
432
|
+
-->
|
|
433
|
+
|
|
434
|
+
[umd]: https://github.com/umdjs/umd
|
|
435
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
436
|
+
|
|
437
|
+
[deno-url]: https://github.com/stdlib-js/utils-parallel/tree/deno
|
|
438
|
+
[umd-url]: https://github.com/stdlib-js/utils-parallel/tree/umd
|
|
439
|
+
[esm-url]: https://github.com/stdlib-js/utils-parallel/tree/esm
|
|
440
|
+
|
|
418
441
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
419
442
|
[chat-url]: https://gitter.im/stdlib-js/stdlib/
|
|
420
443
|
|
package/bin/cli
CHANGED
package/lib/node/exec.js
CHANGED
|
@@ -92,7 +92,7 @@ function exec( files, opts, clbk ) {
|
|
|
92
92
|
idx = -1;
|
|
93
93
|
for ( i = 0; i < opts.concurrency; i++ ) {
|
|
94
94
|
pid = pids[ i%pids.length ];
|
|
95
|
-
next( workers[ pid ] ); // eslint-disable-line callback-return
|
|
95
|
+
next( workers[ pid ] ); // eslint-disable-line node/callback-return
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
@@ -181,7 +181,7 @@ function exec( files, opts, clbk ) {
|
|
|
181
181
|
numClosed += 1;
|
|
182
182
|
debug( '%d of %d child processes have closed.', numClosed, opts.workers );
|
|
183
183
|
if ( numClosed === opts.workers ) {
|
|
184
|
-
done(); // eslint-disable-line callback-return
|
|
184
|
+
done(); // eslint-disable-line node/callback-return
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/utils-parallel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Execute scripts in parallel.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
"parallel": "./bin/cli"
|
|
18
18
|
},
|
|
19
19
|
"main": "./lib",
|
|
20
|
-
"browser":
|
|
20
|
+
"browser": {
|
|
21
|
+
"./lib": "./lib/browser/index.js",
|
|
22
|
+
"process": "process/"
|
|
23
|
+
},
|
|
21
24
|
"directories": {
|
|
22
|
-
"bin": "./bin",
|
|
23
25
|
"doc": "./docs",
|
|
24
26
|
"example": "./examples",
|
|
25
27
|
"lib": "./lib",
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"@stdlib/assert-is-positive-integer": "^0.0.x",
|
|
49
51
|
"@stdlib/assert-is-string": "^0.0.x",
|
|
50
52
|
"@stdlib/assert-is-string-array": "^0.0.x",
|
|
51
|
-
"@stdlib/cli": "^0.0.x",
|
|
53
|
+
"@stdlib/cli-ctor": "^0.0.x",
|
|
52
54
|
"@stdlib/fs-read-file": "^0.0.x",
|
|
53
55
|
"@stdlib/os-num-cpus": "^0.0.x",
|
|
54
56
|
"@stdlib/process-cwd": "^0.0.x",
|