[OT] Senders and Receivers

Sebastiaan Koppe mail at skoppe.eu
Tue Jun 3 19:34:02 UTC 2025


On Monday, 2 June 2025 at 19:32:03 UTC, Derek Fawcus wrote:
> On Monday, 2 June 2025 at 19:22:47 UTC, Sergey wrote:
>> Wanted to share with everyone series of podcasts about the 
>> topic.
>> The topic is quite complicated, so maybe this helps you to 
>> better understand what is it all about.
>> They discussing it mostly from C++ perspective, with some 
>> Haskell ideas.
>>
>> D package with this approach: 
>> https://code.dlang.org/packages/concurrency
>>
>> Podcast series:
>> https://adspthepodcast.com/2025/04/25/Episode-231.html
>> https://adspthepodcast.com/2025/05/23/Episode-235.html
>> https://adspthepodcast.com/2025/05/30/Episode-236.html
>
> Why should "Structured Concurrency" be viewed as a better 
> approach than CSP (or Actors for that matter)?
>
> DF

Some more reading: https://skoppe.github.io/dconf-2022/6

In short: "Structured concurrency organizes concurrent tasks as 
tree-like hierarchies. This means that any child task is 
logically nested within its parent. When a parent task finishes, 
it waits for all its child tasks to complete or is automatically 
cancelled if the parent task fails."

This tree-like hierarchy achieves 2 important things:

- It improves reasoning of the code, like structured programming 
did;
- It ensures lifetimes of concurrent tasks follow the same 
structure, instead of the fire-and-forget approach.


More information about the Digitalmars-d mailing list