3 ms·
OK sorry that was a mistake. It's not a race. But it's still non-local. one has to manually account for what allocation will be done, and keep the reservation
by Ericson2314 6y ago
OK sorry that was a mistake. It's not a race.
But it's still non-local. one has to manually account for what allocation will be done, and keep the reservation in sync across refactors. This isn't a race but still scares me.
Someone could write
shared_v.lock().try_reserved();
shared_v.lock().something();
which would be a race. That is not `try_reserved`'s fault, and a rather easy-to-spot example, but I wonder if there are variations on this which are easier to miss.