handle multi thread access on sensor.