|
2 | 2 |
|
3 | 3 | [](https://circleci.com/gh/hellivan/node-task-scheduling-utilities)
|
4 | 4 | [](https://codecov.io/gh/hellivan/node-task-scheduling-utilities)
|
5 |
| -[](LICENSE) |
| 5 | +[](LICENSE) |
6 | 6 | [](https://github.com/semantic-release/semantic-release)
|
7 | 7 | [](https://renovatebot.com/)
|
8 |
| -[](https://www.npmjs.com/package/node-task-scheduling-utilities) |
9 |
| -[](https://www.npmjs.com/package/node-task-scheduling-utilities) |
| 8 | +[](https://www.npmjs.com/package/ntsu) |
| 9 | +[](https://www.npmjs.com/package/ntsu) |
10 | 10 |
|
11 | 11 | Utility library that provides some basic mechanisms for task scheduling/execution in Node.js
|
12 | 12 |
|
@@ -82,16 +82,12 @@ termination or failure between task-execution will also be catched by this imple
|
82 | 82 | errors or terminates a new `worker_thread` will be instantiated upon next task execution.
|
83 | 83 |
|
84 | 84 | ```typescript
|
85 |
| -import { DynamicWorkerPool, WorkerThreadWorker } from 'ntsu'; |
| 85 | +import { WorkerThreadWorker } from 'ntsu'; |
86 | 86 |
|
87 |
| -// create new dynamic worker pool that uses workerFactory to instantiate new workers |
88 |
| -// and has a max size of 10. The pool will keep at least 3 idle workers if |
89 |
| -const pool = new DynamicWorkerPool( |
90 |
| - { |
91 |
| - createWorker: () => new WorkerThreadWorker('workerThreadScript.js') |
92 |
| - }, |
93 |
| - 3, |
94 |
| - 10 |
| 87 | +// create a workerfactory that instantiates new WorkerThreadWorker workers, that |
| 88 | +// use workerThreadScript.js as worker_threads script |
| 89 | +const workerFactory = { |
| 90 | + createWorker: () => new WorkerThreadWorker('workerThreadScript.js') |
95 | 91 | );
|
96 | 92 | ```
|
97 | 93 |
|
|
0 commit comments