Write some part of TaskThreadMonitor, replace the *Event with TaskEvent