Echo JS 0.11.0

<~>

tracker1 1547 days ago. link 1 point
Suggestions...  for the worker, you don't even need to extend the class, there's no real value here.  Remove the class definition and change the exports to...

    module.exports = new ThreadWorker(yourFunction, {...})

For the pool, put the emitter on the pool itself, you can extend your initial FixedThreadPool/DynamicThreadPool with the emitter... you can add the emitter to your prototype chain or base class(es).

For the pool, instead of passing event handler options, utilize the event emitter...

    pool.on('error', error => ...);
    pool.on('ready', () => ...);

You may also want a method that returns a promise bound to your ready event...

    await pool.ready();

Otherwise, cool concept.