RFC: Change what killing a thread does on error instead

Dukc ajieskola at gmail.com
Wed Jul 9 17:51:22 UTC 2025


On Wednesday, 9 July 2025 at 15:03:04 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> The default implementation could also check a global function 
> pointer to do the grave digger concept of Dukc's.
>
> I am concerned that to set such a default could break existing 
> programs, so I'm not sure what to do about that.

Well, if the existing code relied on threads getting killed 
silently with no effects on other threads it would be break that. 
Maintainers of existing programs could then write do-nothing 
gravedigger delegates if they wish to go back to current 
behaviour.

What to do about the breakage? Simple, IMO: it should be done 
over an edition switch. Ok, not _quite_ so simple because the 
program needs to have one behaviour, and different modules of it 
might have different editions. I reckon that going by the edition 
of the `main()` function module would be reasonable.


More information about the Digitalmars-d mailing list