Why does a TASK_STATE of RUNNING sometimes show a WAIT_TYPE?

  • When joining sys.dm_os_tasks with sys.dm_os_waiting_tasks ON session_id AND exec_context_id I sometimes see a TASK_STATE of RUNNING with a corresponding value for WAIT_TYPE and WAIT_DURATION_MS. How could a task with a state of RUNNING be also waiting on a resource? I thought I should only see waiting for task states of RUNNABLE, PENDING and SUSPENDED, but not RUNNING. sysprocesses does not show this type of behavior. It has been suggested to me that perhaps the WAIT_TYPE is actually the last wait type. I'm not sure that is correct based upon BOL's definitions of the above DMVs.

    Thanks, Dave

  • Anyone???

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply