inaka / worker_pool

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

Implement wpool:broadcast/3 function #120

Open harenson opened 7 years ago

harenson commented 7 years ago

The idea is to implement a function that works like wpool:broadcast/2 and it receives a third parameter that would be a broadcast_strategy.

The default (not necessarily has to have that name) one will work exactly as broadcast/2 works, the other broadcast_strategy will have to queue the message and once the queue gets to this message it will have to handle it specially, I mean, it won't send this message to the first available worker but to all of them.