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.
The idea is to implement a function that works like
wpool:broadcast/2
and it receives a third parameter that would be abroadcast_strategy
.The
default
(not necessarily has to have that name) one will work exactly asbroadcast/2
works, the otherbroadcast_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.