Fixed Tunable deadlock problem for TaskMonitor.

(cherry picked from commit fd4e2a82ceb56f985c8df0435172bdcb011c7bcc)