Use sync to implement real time task manager.