Task switching, or set-shifting, is an executive function that involves the ability to unconsciously shift attention between one task and another. In contrast, cognitive shifting is a very similar executive function, but it involves conscious (not unconscious) change in attention. Together, these two functions are subcategories of the broader cognitive flexibility concept.
^Brady, Danielle I.; Schwean, Vicki L.; Saklofske, Adam W. (2013). "Conceptual and Perceptual Set-shifting Executive Abilities in Young Adults with Asperger's Syndrome". Research in Autism Spectrum Disorders. 7 (12): 1631–1637. doi:10.1016/j.rasd.2013.09.009.