3 ms·
If I understand the Nim manual correctly, there is no sharing of objects across threads. Instead, Nim assumes message passing. When you communicate between thre
by hathawsh 8y ago
If I understand the Nim manual correctly, there is no sharing of objects across threads. Instead, Nim assumes message passing. When you communicate between threads, Nim makes a deep copy of the message.
In theory, that strategy could be very inefficient if the messages are large, but it also means the garbage collector is unaware of threads and therefore simpler.
- btym 8y ago>there is no sharing of objects across threads You can message-pass a pointer if you are sure the referenced object won't be GCed.