Switching Executors
-----------------------------------------------------------------------------------

There are several ways to switch executors in the middle of a task.

* :literal_ref:`tmc::resume_on()<aw_resume_on>`
* :literal_ref:`tmc::enter()<aw_enter_exit>` / :literal_ref:`tmc::exit()<aw_enter_exit>`

The methods linked above are free functions. Additionally, many awaitable types also have a ``resume_on()`` method, which provides a way to switch executors when the awaitable is complete.


.. _current_executor:

.. doxygenfunction:: tmc::current_executor()

.. toctree::
   :maxdepth: 1
   :hidden:

   aw_resume_on
   aw_enter_exit
