from @guidorice — 11/12/2023 12:12 AM
Other than the in stdlib, what kind of thread-safe data structures are in Mojo currently? Is there any locking functionality in the stdlib? I wrote some code to update a SIMD value from parallel workers, and got unsurprisingly, some kind of race condition. No crashes, just occasional unexpected values. Guess this makes sense b/c each core has own simd registers- or something like that.Atomic
Tensor seems to be thread-safe, but that's just my brute force testing approach. Curious how memory is shared between workers in mojo.