worker_pool icon indicating copy to clipboard operation
worker_pool copied to clipboard

Implement wpool:broadcall/2 function

Open harenson opened this issue 7 years ago • 0 comments

Enable worker_pool to perform a synchronous call to every worker within the given pool, wait for the responses and send them back to the caller, e.g:

-spec broadcall(name(), Call) -> [response()].
broadcall(Sup, Call) ->
  Workers = all_workers(Sup),
  [wpool_process:call(Worker, Call, Timeout) || Worker <- Workers].

harenson avatar Jul 26 '17 18:07 harenson