josdejong / workerpool

Offload tasks to a pool of workers on node.js and in the browser
Apache License 2.0
2.06k stars 147 forks source link

How can a worker listen to master's specific event? #396

Closed pilaoda closed 1 year ago

pilaoda commented 1 year ago

I notice that master can exec specfic function in worker and worker can emit event during executing, but there is no anti way to receive event from master during executing in the readme.

How can a worker subscribe to the master's event during executing? And how can the master emit this event to the exact worker?

josdejong commented 1 year ago

There is no build-in solution for that right now, but this feature is discussed in #185. Let's continue the discussion there.