Readable Asynchronous State Machines with Lua Coroutines Jul 31, 2025 Use the Lua 5.4.8 coroutine API to separate waiting intents from a scheduler, with explicit cancellation, error boundaries, and deterministic tests.