Randomize is not thread-safe. It mutates shared data structures in a 
memory-unsafe way (no synchronization/locking).

Even with @yglukhoov's suggestion of using []=, you would still need some form 
of coordination to figure out which parts of the list each thread should assign 
to, in order to ensure they are non-overlapping.

For such use-case, my recommendation would be to use a sharedlist 
([https://nim-lang.org/docs/sharedlist.html)](https://nim-lang.org/docs/sharedlist.html\)).
 

Reply via email to