We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f6dacd commit adead5aCopy full SHA for adead5a
src/util.jl
@@ -373,11 +373,17 @@ end
373
See [`@⌛`](@ref)
374
"""
375
macro show⌛(ex)
376
- quote
377
- reset_timer!(get_defaulttimer())
378
- result = $(esc(ex))
379
- show(get_defaulttimer())
380
- result
+ if Threads.nthreads()>1
+ # TimerOutputs is not thread-safe
+ # https://github.com/KristofferC/TimerOutputs.jl/issues/72
+ esc(ex)
+ else
381
+ quote
382
+ reset_timer!(get_defaulttimer())
383
+ result = $(esc(ex))
384
+ show(get_defaulttimer())
385
+ result
386
+ end
387
end
388
389
0 commit comments