Structured concurrency resources

This is a wiki post (anyone can edit) to collect links to articles and other resources about structured concurrency. It’s probably missing stuff – please add to it!

Implementations

Articles, talks, etc.

Ordered roughly by date:

2016

2018

2019

2022

  • Structured Concurrency - Sebastiaan Koppe, DConf '22 (Note: good overview, considers the existing C++ P2300 concurrency proposal, including how “structured” it is, as well as how it supports “sans-I/O”, and rendering something similar in D language.)
6 Likes

The following link can be used for Kotlin coroutines: http://kotlinlang.org/docs/reference/coroutines/basics.html This is the basic intro into the coroutines library and it contains a separate section on structured concurrency.

1 Like

Hello :wave: and thanks! Do you want to edit the original post to add that? I think you should be able to by clicking the “Edit” button at the bottom of it, and I’m kind of curious whether it works :-). (If it doesn’t then I can edit it in.)

It does not show “Edit” for me. By the way, my recent post on “The reason to avoid GlobalScope” https://medium.com/@elizarov/the-reason-to-avoid-globalscope-835337445abc is also a veiled ad for structured concurrency, showing typical problems that exist if you don’t have one.

Ah-hah, apparently there’s an anti-spam thing where users have to be “trust level 1” before they can edit wiki posts, and since you only signed up 10 minutes ago you were still “trust level 0”. I just manually marked you as “trust level 2”, so you should be able to edit it now (and also post unlimited links and stuff like that).

Roman also has several posts on Medium which could fit in. I’m also going to add my own piece that introduces the idea of call stack vs. call tree.

1 Like

@sustrik Your link was already there :slight_smile: I merged the duplicates.

PS: check it out: “tree-o” :wink:

(full disclosure: this wasn’t actually the original motivation for the name… I was explaining the ideas to Stefan Karpinski and when I got to call trees he was like “oh, that’s why you called it that!” and I was like “wait what? oh, I mean… yes, exactly, because I’m very clever”)

1 Like

I can’t edit this. So I’ll just suggest a change. I think you should add curio to the list of Python packages that support this.

Hmm, so that raises an interesting question… there are a lot of systems like Curio that make it possible to arrange concurrency in a structured way (curio taskgroups, erlang supervisors, go errgoup, rust crossbeam::scope, etc etc), but currently the list only shows packages where “structured concurrency” is an organizing principle for the whole API. Is a more comprehensive list useful? Does someone want to take responsibility for curating it?

I just published an nursery for Rust:

https://docs.rs/async_nursery

I hope it’s ok I re-used the name nursery. All feedback welcome.

2 Likes

Here is a list of what I feel to be (at least partial) “structured concurrency” solutions.

Another entry for 2022:
Structured Concurrency - A talk at ACCU 2022 by Lucian Radu Teodorescu

The code for senders and receivers is currently at NVIDIA’s stdexec repository (I can only put a maximum of 2 links in the post). There’s also a bunch more links there if you want to dig deeper.

Hylo-lang (formerly Val) also has these (mentioned here). What’s notable is the lack of function colouring.