Sync addMeasurement. Otherwise there will be thread concurences.