revise TaskMgr, fix the CPU consumption issue