Shawn H wrote:
How is this relevant when the work is a one-time thing, not something you'd loop through? Is there something I'm missing?
Hmm, so there's no loop in your threads? Each thread just has a sequence of steps that is performed? Could you choose some strategic places within those steps to check to see if all is well?
if(everythingOk)
{
DoSomething();
}
if(everythingOk)
{
DoSomethingElse();
}
// etc...
Kind of cumbersome, but it's the only way I can think of offhand for terminating a loopless thread "naturally."