News for hackers. Stuff that matters.
Re:Structured Concurrency by ghoward on Saturday March 19, 2022 @11:57PM (#30739956)
You're probably right that my rough sketch for a proof wouldn't work.

That said, first of all, I don't think structured concurrency has to be a tree. I think it can be a DAG. See my comment at [0].

To solve the main(), quux(), foo() problem, just have main() open a threadset, spawn quux(), then call a function while the threadset is still open, and in that function, open another threadset that spawns foo().

The main(), foo(), bar() problem is a problem of cancellation. In that one, I believe that foo() should not return until bar() does. And if you need to cancel, use deadlines. That is why my code has cancellation built-in, with timers to implement deadlines. (Well, it's still alpha, but the rough shape of it is there.)

[0]: https://lobste.rs/s/8msejg/notes_on_structured_concurrency_g...

There are no comments on this comment yet.