Although tasks generally run in an infinite loop, they can be terminated at any time. This includes during the RUNNING state if the task exits.