Assert in child thread exits without error message?

FinalEvilution FinalEvilution at gmail.com
Thu Jun 4 19:38:52 UTC 2026


On Thursday, 4 June 2026 at 19:16:28 UTC, Ali Çehreli wrote:
> [Sending to the forum as well.]

Sending my reply to your reply because i didn't see
the forum update before i sent my email. (lol)

> On 6/4/26 3:34 AM, FinalEvilution wrote:
>
> > as I'd think someone other than me would have tripped over
> this by now.
>
> This topic is a part of a presentation of mine at this point:
>
>   https://youtu.be/dRORNQIB2wA?t=1735
>
> I recommend each thread catching their threads to communicate 
> their exit on slide 79. There is a complete program on slide 91.
This is the solution i needed but didn't know i needed. Thank you.


> The code can be made more useful by using a function template 
> for thread entry for all thread functions instead of writing a 
> special one like workerThread() for each thread. In fact, 
> that's what I did in professional D code of mine.
I've thought about how I would apply this idea to my code and 
you're
right. This would be a lot cleaner.

Do you know why this is the default behavior of spawn and 
spawnLinked?
The module and function docs don't mention anything, and i'd 
think that
any Error thrown even in a child thread would put the program 
into an
invalid state, and therefore the entire program should be killed.


More information about the Digitalmars-d-learn mailing list