cwThread.cpp : Added check for state=='exited' in wait for state.
This commit is contained in:
parent
df65e0ac23
commit
1df530a36b
@ -59,6 +59,11 @@ namespace cw
|
|||||||
|
|
||||||
if(curStateId == stateId )
|
if(curStateId == stateId )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if(curStateId == kExitedThId)
|
||||||
|
{
|
||||||
|
return cwLogError(kInvalidStateRC,"Cannot wait on an thread that has already exited.");
|
||||||
|
}
|
||||||
|
|
||||||
sleepUs( p->waitMicros );
|
sleepUs( p->waitMicros );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user