@zukhruf/pool 0.6.4 → 0.6.6
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/README.md +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,6 +19,8 @@ const text = await pool.use((worker) => worker.read('/tmp/receipt.png'));
|
|
|
19
19
|
|
|
20
20
|
A worker gives `exited()`, `kill()`, `close()`, and optionally `ready()`. A `Coprocess` of `@zukhruf/coprocess` has all of them. When a signal aborts a job that runs, the pool kills its worker. When a signal aborts a job whose worker still warms up, the warm-up continues for the next job.
|
|
21
21
|
|
|
22
|
+
The pool waits for `ready()` with no time limit. Thus, if the warm-up of a worker can wait forever, the worker sets its own time limit, and `ready()` rejects when that limit ends. The pool then kills and closes the worker, and the job that waits for it fails. The next job starts a new worker.
|
|
23
|
+
|
|
22
24
|
## Choose when the workers start
|
|
23
25
|
|
|
24
26
|
| Startup | Starts |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zukhruf/pool",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Lend long-lived workers, such as native helper processes, to one job at a time: startups that decide when workers start, sizings that decide how many run, and replacement of a worker that exits.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@zukhruf/async": "^0.6.
|
|
44
|
+
"@zukhruf/async": "^0.6.6",
|
|
45
45
|
"p-queue": "10.0.0"
|
|
46
46
|
}
|
|
47
47
|
}
|