Cercando a lungo ho trovato:
STL containers are not intrinsically thread-safe. You need to protect access to them using a synchronization mechanism. The typical ones could be a semaphore or a mutex, with the mutex being in general the faster of the two.

Il problema è questo?
Anche se non mi è chiaro perchè visto che nel "critical" c'è tutta una porzione di codice.