Skip to content

Commit

Permalink
Partial rewrite/clean + test passing
Browse files Browse the repository at this point in the history
  • Loading branch information
josePereiro committed Oct 9, 2024
1 parent 11bda94 commit 85f7e83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/1.BloberiaBase/iterator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function _foreach_batch_th(f::Function, B::Bloberia, group_pt = nothing;
return nothing
end

# the execution of `f()` is in concurrent if n_tasks > 1
function foreach_batch(f::Function, B::Bloberia, group_pt = nothing;
sortfun = identity,
ch_size::Int = nthreads(),
Expand All @@ -150,7 +151,7 @@ function foreach_batch(f::Function, B::Bloberia, group_pt = nothing;
locked = false
)
if n_tasks > 1
_foreach_batch_th(f, B, group_pt; sortfun, ch_size, n_tasks, locked)
_foreach_batch_th(f, B, group_pt; sortfun, ch_size, n_tasks, preload, locked)
else
_foreach_batch_ser(f, B, group_pt; sortfun, ch_size, preload, locked)
end
Expand Down

0 comments on commit 85f7e83

Please sign in to comment.