/* virtual */ bool Exit() { struct OTTDThreadStartupMessage *msg; /* You can only exit yourself */ assert(IsCurrent()); KPutStr("[Child] Aborting...\n"); if (NewGetTaskAttrs(NULL, &msg, sizeof(struct OTTDThreadStartupMessage *), TASKINFOTYPE_STARTUPMSG, TAG_DONE) && msg != NULL) { /* For now we terminate by throwing an error, gives much cleaner cleanup */ throw OTTDThreadExitSignal(); } return true; }
/* virtual */ bool Exit() { assert(pthread_self() == this->thread); /* For now we terminate by throwing an error, gives much cleaner cleanup */ throw OTTDThreadExitSignal(); }
/* virtual */ bool Exit() { assert(GetCurrentThreadId() == this->id); /* For now we terminate by throwing an error, gives much cleaner cleanup */ throw OTTDThreadExitSignal(); }