Skip to content

Commit

Permalink
safe_lock is nthreads() > 1 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Jul 8, 2024
1 parent 5117ed0 commit d1d9f9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProgressMeter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Base.@kwdef mutable struct ProgressCore
numprintedvalues::Int = 0 # num values printed below progress in last iteration
prev_update_count::Int = 1 # counter at last update
printed::Bool = false # true if we have issued at least one status update
safe_lock::Bool = true # set to false for non-threaded tight loops
safe_lock::Bool = Threads.nthreads() > 1 # set to false for non-threaded tight loops
tinit::Float64 = time() # time meter was initialized
tlast::Float64 = time() # time of last update
tsecond::Float64 = time() # ignore the first loop given usually uncharacteristically slow
Expand Down

0 comments on commit d1d9f9c

Please sign in to comment.