# Use Async Execution This tutorial runs a batched solve and two independent solves from one active `asyncio` event loop. An event loop runs asynchronous operations. Each {func}`solve ` uses `asynchronous=True` and returns a coroutine, which the event loop waits for. Run the tutorial from the tutorial root: ```bash python execution_runtime/async/run.py ``` Use `asyncio.run(main())` only in a script entry point. In a notebook or an async service, await `main()` from the existing event loop instead. ## Python File ```{literalinclude} ../../../demos/documentation_tutorials/execution_runtime/async/run.py :language: python ``` ## Project Files
layout.jcmt ```{literalinclude} ../../../demos/documentation_tutorials/execution_runtime/async/layout.jcmt :language: jcm ```
materials.jcm ```{literalinclude} ../../../demos/documentation_tutorials/execution_runtime/async/materials.jcm :language: jcm ```
mie2D.jcmp ```{literalinclude} ../../../demos/documentation_tutorials/execution_runtime/async/mie2D.jcmp :language: jcm ```
sources.jcm ```{literalinclude} ../../../demos/documentation_tutorials/execution_runtime/async/sources.jcm :language: jcm ```