Skip to content

Commit

Permalink
Update search_and_matching.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Dec 3, 2024
1 parent a2375a5 commit 0adb6f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/markets/search_and_matching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ function search_and_matching!(model, multi_threading = false)


if multi_threading
Threads.@threads :static for g in 1:G
loopBody(Threads.threadid(), g)
Threads.@sync for (i, gs) in enumerate(chunks(1:G; n=Threads.nthreads(), split=RoundRobin()))
for g in gs
Threads.@spawn loopBody(i, g)
end
end
else
for g in 1:G
Expand Down

0 comments on commit 0adb6f5

Please sign in to comment.