To make my code thread-safe, I am making some constant thread local. However, in the following package example
module Foo
const bar = zeros(Threads.nthreads())
end
the length of bar
will be stuck at JULIA_NUM_THREADS
at the time of compilation.
What’s the correct way to make the constant bar
thread local?