Subj : Re: Main thread going away but worker threads executing? To : comp.programming.threads From : David Schwartz Date : Tue Jul 19 2005 12:58 am "Ian" wrote in message news:1121745342.877514@drone2-svc-skyt.qsi.net.nz... > Isn't the fact that returning from one thread calls exit while returning > from another does not make it special? If not special, then at least > different :) Returning from the thread does not call exit. Only returning from "main" does, and this is true for any thread. Essentially, the code looks like this: init(); main(); exit(); So there's nothing special about the thread, just that if you return from 'main', the thread will call 'exit'. If your platform has a tricky way for you to get another thread to return from 'main' (say by saving the context and resuming it with another thread), try it, and you'll find that the process exits just the same. DS .