Detecting premature end of spawned threads with std.concurrency

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 4 01:33:06 PDT 2015


On Thursday, 3 September 2015 at 21:20:59 UTC, Matt Kline wrote:
> TDPL suggests that calls to std.concurrency.send will fail with 
> an "OwnedTerminated" or "OwnedFailed" exception if the 
> destination thread has exited, but neither the docs nor the 
> current Phobos implementation make any mention of such 
> exceptions. Thinking the information was just outdated, I 
> searched the Git history of Phobos for such types, but found 
> nothing.
>
> What are current best practices for determining if a child 
> thread has died? And should these types be added to TDPL errata?

They're called `OwnerTerminated` and `OwnerFailed` with an "r".


More information about the Digitalmars-d-learn mailing list