[polling] listen for stop event instead of using blocking sleep()