Skip to content

Commit 4cb7165

Browse files
committed
Update bmark_solvers.jl
1 parent 294a198 commit 4cb7165

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bmark_solvers.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A Dict{Symbol, AbstractExecutionStats} of statistics.
2424
function bmark_solvers(solvers::Dict{Symbol, <:Any}, args...; kwargs...)
2525
stats = Dict{Symbol, DataFrame}()
2626
# Initialize the lock for thread-safe updates
27-
lock = ReentrantLock()
27+
my_lock = ReentrantLock()
2828
key_array = collect(keys(solvers)) # Convert keys to an array for indexing
2929

3030
Threads.@threads for i in eachindex(key_array)
@@ -33,7 +33,7 @@ function bmark_solvers(solvers::Dict{Symbol, <:Any}, args...; kwargs...)
3333
@info "Running solver $name on thread $(Threads.threadid())"
3434
result = solve_problems(solver, name, args...; kwargs...)
3535
# Ensure thread-safe access to `stats`
36-
lock(lock) do
36+
lock(my_lock) do
3737
stats[name] = result
3838
end
3939
end

0 commit comments

Comments
 (0)