I wasn’t able to find anything about this in the documentation either.
However, I ended up with the following pattern.
arr = [i for i=1:4]
for item in arr
jobs = RemoteChannel(()->Channel(producer));
results = RemoteChannel(()->Channel(32));
@everywhere function do_work(jobs, results)
x = try take!(jobs) end
if x == nothing
put!(results, (x, myid()))
for p in workers() # start tasks on the workers to process requests in parallel
remote_do(do_work, p, jobs, results)
results_taken = 0
while results_taken < length(arr)
r = take!(results)
results_taken += 1