Structured Concurrency
Just so you know, those of us who believe in structured concurrency often have slightly different meanings (which I believe will converge over time). My definition is at [0].<p>Beyond libdill, a rough version has now been implemented in C. (By me, sorry for shilling.)<p>An example of it in code is at [1].<p>Combine it with something I call a stackpool (basically a heap-allocated replacement for `alloca()`), and you can worry very little about managing memory manually, even in C.<p>In fact, both together can even serve the same purpose as Rust&#x27;s borrow checker in C, if you are willing to write your code with a certain style.<p>Once I implement it as a first-class construct in a language (which I&#x27;m doing right now), it will look like this:<p><pre><code>    threadset
    {
        &#x2F;&#x2F; This starts a thread.
        go run_thread(arg1, arg2, etc);

        &#x2F;&#x2F; The current thread does not leave
        &#x2F;&#x2F; this block until all threads finish.
    }
</code></pre>
I&#x27;m happy to answer questions.<p>[0]: <a href="https:&#x2F;&#x2F;gavinhoward.com&#x2F;2019&#x2F;12&#x2F;structured-concurrency-definition&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gavinhoward.com&#x2F;2019&#x2F;12&#x2F;structured-concurrency-defin...</a><p>[1]: <a href="https:&#x2F;&#x2F;git.yzena.com&#x2F;Yzena&#x2F;Yc&#x2F;src&#x2F;commit&#x2F;30f4ae4e471cb5a500da85812619199b4bda5450&#x2F;src&#x2F;rig&#x2F;build.c#L962-L1010" rel="nofollow">https:&#x2F;&#x2F;git.yzena.com&#x2F;Yzena&#x2F;Yc&#x2F;src&#x2F;commit&#x2F;30f4ae4e471cb5a500...</a>