JuliaInterop / MATLAB.jl

Calling MATLAB in Julia through MATLAB Engine
MIT License
269 stars 63 forks source link

Using MATLAB within multiple threads #169

Open yakir12 opened 4 years ago

yakir12 commented 4 years ago

I get read errors or stalling if I try to use MATLAB with multiple threads. If this is indeed impossible, maybe mention this in the README/docs.

MWE:

using MATLAB, Base.Threads
@threads for _ in 1:10
    mat"1 + 1"
end
musm commented 4 years ago

Yeah this is an untested configuration that's unlikely to work without some help.

VoSiLk commented 4 years ago

I also had interferences in the values of some variables of scripts, which using MATLAB when they are calculating at the same time