Fatal error in ~Thread if thread still running (undefined behavior)

This commit is contained in:
Vinnie Falco
2013-08-05 09:19:34 -07:00
parent 5e3548fc00
commit 0c00335627

View File

@@ -40,10 +40,7 @@ Thread::~Thread()
To avoid this type of nastiness, always make sure you call stopThread() before or during To avoid this type of nastiness, always make sure you call stopThread() before or during
your subclass's destructor. your subclass's destructor.
*/ */
bassert (! isThreadRunning()); fatal_require (! isThreadRunning());
if (isThreadRunning())
FatalError ("Thread is still running", __FILE__, __LINE__);
} }
//============================================================================== //==============================================================================