//This is not atomically synchronized since we do an array //access together with an update, which are two operations. vec[key] += amount;
return vec[key];
vec[key] = 0;