lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

This is really good. I like the way the features are presented as incremental development. It would be neat to see diffs for each increment showing what code needed to be added or changed for the new functionality.


I’d like to see (eventually) examples of composing tasks from multiple modules. Do the tasks have to use a common nursery? If a concurrent API hides its nursery from clients, can its APIs be composed? Will they support error handling and cancellation?







From: John Belmonte <>
Sent: Sunday, September 18, 2022 7:09 AM
To: Lua mailing list <>
Subject: Re: [ANN] article: Structured concurrency and Lua


EXTERNAL EMAIL - Use caution opening attachments and links.

I've posted part 2 of the series:



Notably, it's demonstrating error tracebacks that span multiple coroutines, and the ability to catch an error from any intermediate coroutine along the way-- just as you would with a call stack that didn't spawn coroutines.


On Fri, Sep 9, 2022 at 11:57 PM John Belmonte <> wrote:

I'm sharing a draft article "Structured concurrency and Lua (part 1)".



After the long road of lobbying for scope exit hooks in Lua (begun around the time of the Lua Gems book, in 2008), it's been nice to finally have the feature and apply it to problems.  What I couldn't imagine in 2008, however, is that one would ever want to yield from scope exit.  But Lua can do that now too, enabling interesting possibilities, such as the structured concurrency presented in the article.


Feedback is welcome here or on github.  (Encouragement also, if you'd like to see the series continue.)




This message may constitute an advertisement of a BD group's products or services or a solicitation of interest in them. If this is such a message and you would like to opt out of receiving future advertisements or solicitations from this BD group, please forward this e-mail to [BD.v1.0]
This message (which includes any attachments) is intended only for the designated recipient(s). It may contain confidential or proprietary information and may be subject to the attorney-client privilege or other confidentiality protections. If you are not a designated recipient, you may not review, use, copy or distribute this message. If you received this in error, please notify the sender by reply e-mail and delete this message. Thank you.
Corporate Headquarters Mailing Address: BD (Becton, Dickinson and Company) 1 Becton Drive Franklin Lakes, NJ 07417 U.S.A.