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 21b422cda9
commit 9b3d0d73aa

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__);
} }
//============================================================================== //==============================================================================