Do threads 'end' themselves using core.thread?

Ali Çehreli acehreli at yahoo.com
Sun Jul 21 08:30:01 PDT 2013


On 07/20/2013 09:43 PM, Ali Çehreli wrote:

 > When the parent thread terminates the child processes terminate as well.

I am wrong there: What I said above is true for the main program thread. 
When the main program terminates, its threads are terminated as well.

Otherwise, a child can continue running even though its parent (owner) 
has terminated. This is evidenced by the fact that std.concurrency has 
an exception named OwnerTerminated, useful for the child.

Ali



More information about the Digitalmars-d-learn mailing list