3 ms·
> If I was asked about deadlocks, I would say "always acquire resources in the same order". I don't think that's the correct solution, unfortunately - see e.g.
by tomp 7y ago
> If I was asked about deadlocks, I would say "always acquire resources in the same order".
I don't think that's the correct solution, unfortunately - see e.g. the dining philosophers problem.
Edit: or rather, you have to be very careful what the "order" of resources is.