|
|
|
|
|
by yminsky
4410 days ago
|
|
I don't think this is correct. All pure data structures are threadsafe. It's true that mutable datastructures like the built-in hashtable are not threadsafe. But isn't that the standard tradeoff with threads? Most things aren't threadsafe, but with mutexes and condition variables and the like, you can make them so. Surely one doesn't want to make the performance destroying mistake of making _everything_ threadsafe. To be clear, it is true that the runtime has a single lock for the GC, so for now, it's not possible to gain physical parallelism from multiple threads. That's being worked on, but I have to say that I rather prefer message passing and I don't know that how we build programs will change much when shared memory threads are available. |
|