John Belmonte, 2022-Sep
In the previous installment, we introduced some basics of structured concurrency, and considered how this paradigm might fit within the Lua programming language.
An important point was encapsulation: the caller of a function shouldn't be concerned whether the implementation employs concurrency or not. We shouldn't have to give up features of the language or runtime just because our program contains concurrency.
A primary example is exception handling. In a basic Lua program without concurrency, we have the following expectations about error propagation: