3 ms·
https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-server-example https://trio.readthedocs.io/en/stable/tutorial.html#tutorial... Even Python's
by Jtsummers 4y ago
https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-server-example https://trio.readthedocs.io/en/stable/tutorial.html#tutorial...
Even Python's Trio (which asserts that it is structured concurrency) uses await. But even Ada didn't use `await` (most languages didn't) and has had something very close to structured concurrency since 1983 (first published spec).
https://learn.adacore.com/courses/intro-to-ada/chapters/tasking.html#tasks https://learn.adacore.com/courses/intro-to-ada/chapters/task...
One of the important parts of structured concurrency is that if you have something like this:
a
spawn(b)
spawn(c)
`a` cannot terminate until after `b` and `c` have terminated (or it has to terminate them), at least not without moving the tasks or spawning them inside a nursery that will survive `a`'s scope. That's been baked into Ada since its first spec 40 years ago (along with many other elements of structured concurrency).
- akkartik 4y agoThanks! Yeah, I meant whether child threads were allowed to outlive their parents.