refactored ThreadedSensor about inter-thread synchronization
Refactor Sensor
Refactored ThreadedSensor class to use Thread class