Hi everyone! First of all  sorry for my english
Always used to write on C, but now i have to do kind of homework using rust and it’s really hard to understand some things. The algorithm is:

ask dimensions of matrix

put random numbers there

create 2 threads, and give each of them to count a half of rows for answer matrix

print answer
the 3rd step looks like that:let fthr = thread::spawn( move  { for z in 0..half { for i in 0..d{ for j in 0..a{ resultM[z][i]+=(firstM[z][j])*(secondM[j][i]);} } } }); let sthr = thread::spawn(move  { for z in half..a { for i in 0..d{ for j in 0..a{ resultM[z][i]+=(firstM[z][j])*(secondM[j][i]);} } } });
And of course i got error “used moved value” for second thread and both 3 matrix. But what should i use to share them? channels? mutex? Just don’t know what is the right way to solve this problem
Thanks!