4 ms·
> in a typical language you can easily pass by reference between ... threads Yeah. And that is almost always an error on those languages too.
by marcosdumay 4y ago
> in a typical language you can easily pass by reference between ... threads
Yeah. And that is almost always an error on those languages too.
- pclmulqdq 4y agoIt's often not. Many high- performance libraries use fine- grained locking within logical units (eg locking buckets within a hash table in the fast path rather than locking the table), which almost necessitates sharing references.
- marcosdumay 4y agoSo, you keep the hash table read-only on a static context, and only mutates some internal references? In rust you will have to declare it exactly like that. That's not really an example of passing mutable references between threads.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]