[OT] Senders and Receivers

Paul Backus snarwin at gmail.com
Thu Jun 5 01:29:21 UTC 2025


On Wednesday, 4 June 2025 at 19:59:27 UTC, Ali Çehreli wrote:
> On 6/2/25 11:06 PM, Paul Backus wrote:
>
> > The main thesis (quoted from the article's conclusion) is
> this:
> >
> >> These [unstructured concurrency] primitives are dangerous
> even if we
> >> don't use them directly, because they undermine our ability
> to reason
> >> about control flow and compose complex systems out of
> abstract modular
> >> parts, and they interfere with useful language features like
> automatic
> >> resource cleanup and error propagation.
>
> The garbage collector wins in that scenario because it removes 
> the need for "automatic resource cleanup" e.g. of C++.
>
> That fact was pointed out to me by a colleague years ago: The 
> sender threads generate messages, the receiver threads use 
> those messages, and thanks to the garbage collector, nobody 
> cares about the ownership of messages.

The linked article mostly talks about Python and Go, which are 
both garbage-collected languages. The "resources" referred to 
here are things like open files and network connections, which 
are not reclaimed by the GC.


More information about the Digitalmars-d mailing list