Carlos Mocholí eec862ef2f
Revert "Update Lightning App docs (#13537)" (#13655)
This reverts commit cd31ba3f87d51b1e09e466c34b9b530809b38ddd.
2022-07-14 09:45:46 -04:00

12 lines
594 B
ReStructuredText

.. _event_loop:
##########
Event loop
##########
Drawing inspiration from modern web frameworks like `React.js <https://reactjs.org/>`_, the Lightning app runs all flows in an **event loop** (forever), which is triggered several times a second after collecting any works' state change.
.. figure:: https://pl-flash-data.s3.amazonaws.com/assets_lightning/lightning_loop.gif
When running an app in the cloud, the ``LightningWork`` run on different machines. LightningWork communicates any state changes to the **event loop** which re-executes the flow with the newly-collected works' state.