inaka / worker_pool

Erlang worker pool
https://hex.pm/packages/worker_pool
Apache License 2.0
276 stars 80 forks source link

update the state of each workers? #70

Closed benoitc closed 8 years ago

benoitc commented 8 years ago

For some application I need to update the state of all the workers, any idea how it could be done? I m not sure what's the best way to recover the list of all workers PID in a pool and send them a message. Any idea is welcome :)

elbrujohalcon commented 8 years ago

Off the top of my head: use wpool:cast with next_worker strategy NumberOfWorkers times. That's how we do it in the tests.

benoitc commented 8 years ago

i missed the answer, sorry for that.