Add a pool option to register a message listener on pool workers (#487)
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 29 Aug 2021 08:52:45 +0000 (10:52 +0200)
committerGitHub <noreply@github.com>
Sun, 29 Aug 2021 08:52:45 +0000 (10:52 +0200)
commit35cf1c03f8379b58e410cad57189912379ee7b36
treeb283d3082db22af8ff0d0ddd43f60cfc08271f2d
parent0a23f635bcf025aeb34a5fa9be997260ea1009a9
Add a pool option to register a message listener on pool workers (#487)

* Add a pool option to register a message listener on pool workers

It's a requirement to build bi-directionnal communications with the main
thread with poolifier.

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
* Loosen type on MessageHandler type.

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
CHANGELOG.md
src/pools/abstract-pool.ts
src/pools/cluster/dynamic.ts
src/pools/cluster/fixed.ts
src/pools/thread/dynamic.ts
src/pools/thread/fixed.ts
tests/pools/abstract/abstract-pool.test.js