Skip to content

Commit 89c137c

Browse files
authored
Fix typo in iterate(itr::AsyncCollector) (#43041)
1 parent 65a6bca commit 89c137c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

base/asyncmap.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,7 @@ end
305305
function iterate(itr::AsyncCollector)
306306
itr.ntasks = verify_ntasks(itr.enumerator, itr.ntasks)
307307
itr.batch_size = verify_batch_size(itr.batch_size)
308-
if itr.batch_size !== nothing
309-
exec_func = batch -> begin
310-
# extract indices from the input tuple
311-
batch_idxs = map(x->x[1], batch)
312-
313-
# and the args tuple....
314-
batched_args = map(x->x[2], batch)
315308

316-
results = f(batched_args)
317-
foreach(x -> (itr.results[batch_idxs[x[1]]] = x[2]), enumerate(results))
318-
end
319-
else
320-
exec_func = (i,args) -> (itr.results[i]=itr.f(args...))
321-
end
322309
chnl, worker_tasks = setup_chnl_and_tasks((i,args) -> (itr.results[i]=itr.f(args...)), itr.ntasks, itr.batch_size)
323310
return iterate(itr, AsyncCollectorState(chnl, worker_tasks))
324311
end

0 commit comments

Comments
 (0)