Open jkosata opened 2 years ago
This code is not thread safe! But shouldn't be hard to make it.
I suspected that might be the case, but it's not obvious to me why since neither expand
or simplify_fractions
mutate its argument.
PolyForm uses some global state to reuse DynamicPolynomials variables.
MWE using 2 threads:
gives
The threaded loop needs to be ran many times for the error to appear. In the code I am using where the expressions are much larger, the error appears much more often.