I know that I can use multiple threads on Julia by initializing a REPL with
julia --threads 4
but is there a way to add threads from within Julia? I can change nthreads by doing this
julia> Threads.nthreads()
1
julia> Threads.nthreads() = 4
julia> Threads.nthreads()
4
but I don't notice any performance increase. I have a feeling that setting the number of threads this way does not work the way I am expecting it to.