diff --git a/TODO.txt b/TODO.txt index 211334626..cfee8af9b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,8 +4,6 @@ BEAST TODO - add expectThrow() to UnitTest, where it expects an exception -- Remove timeout forced-kill from Thread::stopThread () - - Import secp256k1 from sipa - HashMap work: diff --git a/modules/beast_core/threads/beast_Thread.cpp b/modules/beast_core/threads/beast_Thread.cpp index 0a5fffae4..8e5e41f98 100644 --- a/modules/beast_core/threads/beast_Thread.cpp +++ b/modules/beast_core/threads/beast_Thread.cpp @@ -42,7 +42,8 @@ Thread::~Thread() */ bassert (! isThreadRunning()); - stopThread (100); + if (isThreadRunning()) + FatalError ("Thread is still running", __FILE__, __LINE__); } //============================================================================== diff --git a/modules/beast_core/threads/beast_Thread.h b/modules/beast_core/threads/beast_Thread.h index 2a3027264..0315ab44e 100644 --- a/modules/beast_core/threads/beast_Thread.h +++ b/modules/beast_core/threads/beast_Thread.h @@ -56,10 +56,7 @@ public: /** Destructor. - Deleting a Thread object that is running will only give the thread a - brief opportunity to stop itself cleanly, so it's recommended that you - should always call stopThread() with a decent timeout before deleting, - to avoid the thread being forcibly killed (which is a Bad Thing). + If the thread has not been stopped first, this will generate a fatal error. */ virtual ~Thread();