$ luarocks install atmos
Atmos is a programming library for Lua that reconciles *Structured
Concurrency* with *Event-Driven Programming*, extending classical
structured programming with two main functionalities:
- Structured Deterministic Concurrency:
- The `task` primitive with deterministic scheduling provides
predictable behavior and safe abortion.
- Structured primitives compose concurrent tasks with lexical scope
(e.g., `watching`, `every`, `par_or`).
- The `tasks` container primitive holds attached tasks and control
their lifecycle.
- Event Signaling Mechanisms:
- The `await` primitive suspends a task and wait for events.
- The `emit` primitive signal events and awake awaiting tasks.
Atmos is inspired by synchronous programming languages like Ceu and
Esterel.