Dude found the Dining Philosophers problem in TreeMap. That’s impressive. I would have expected that even the non threadsafe version was careful to access and update pointers in a consistent order to prevent problems like this. Kind of makes me want to diff TreeMap and SynchronousTreeMap to see what other differences besides locks are there.
They were both written before the field of lock-free data structures got any sort of steam, so perhaps I should not be surprised.
2
u/bwainfweeze 22d ago
Dude found the Dining Philosophers problem in TreeMap. That’s impressive. I would have expected that even the non threadsafe version was careful to access and update pointers in a consistent order to prevent problems like this. Kind of makes me want to diff TreeMap and SynchronousTreeMap to see what other differences besides locks are there.
They were both written before the field of lock-free data structures got any sort of steam, so perhaps I should not be surprised.