Non è che magari chiami quella funzione da due thread diversi?