Open DrChainsaw opened 2 years ago
JULIA_COPY_STACKS=1 is discouraged, and forces every Task to stay on the thread that spawned it
JULIA_COPY_STACKS=1 is discouraged, and forces every Task to stay on the thread that spawned it
Is it mentioned somewhere that this is discouraged apart from this issue? I cannot find this variable in Environment Variables, and according to #43463 (from two years ago) there wasn’t any documentation.
I had some multi-threaded code that worked fine before but dramatically slowed down after I used a package that required JavaCall.jl, which listed setting JULIA_COPY_STACKS
to 1 as one of the setup steps. Because I did not noticed the slowdown immediately, it was very difficult to link these two things together. It would be nice if some sort of warning could be added when using Threads.@threads
while JULIA_COPY_STACKS=1
.
Also see #44589.
I don't have need for this to work, just trying to be a good open source citizen and reporting what looks like a regression. Sorry if it is just noise. I just happened to have this set for other (now obsolete) reasons and on 1.8.2 it triggered this exception. Below is a dependency free MWE.