# Article: Structured concurrency and Lua

**URL:** <https://trio.discourse.group/t/article-structured-concurrency-and-lua/448>\
**Category:** Structured concurrency\
**Created:** [September 10, 2022, 11:29pm UTC](https://trio.discourse.group/t/article-structured-concurrency-and-lua/448 "2022-09-10T23:29:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![belm0](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/belm0/32/69_2.png) [@belm0](https://trio.discourse.group/u/belm0)\
**Post date:** [September 10, 2022, 11:29pm UTC](https://trio.discourse.group/t/article-structured-concurrency-and-lua/448/1 "2022-09-10T23:29:05Z")

</div>

This is the first of hopefully a series of articles on structured concurrency from the perspective of Lua.

article: **[Structured concurrency and Lua, part 1](https://gist.github.com/belm0/4c6d11f47ccd31a231cde04616d6bb22)**

_background story:_ I started lobbying for some kind of scope exit hook thing in Lua around 2008. We had a centi-thread on the topic every 5 or 10 years. Meanwhile, Python context managers happened; structured concurrency happened. The Lua scope exit feature finally landed last year, complete with async (coroutine yield) support. So time to take a stab at structured concurrency…
