[Development] Using platform-native APIs for terminating QThreads

Marc Mutz marc.mutz at kdab.com
Mon Sep 5 19:35:28 CEST 2016


On Saturday 03 September 2016 09:03:21 Thiago Macieira wrote:
> > Can't swallow doesn't mean can't catch. You can catch it, but you can't
> > not rethrow. But if you call std::terminate(), the rethrow will never be
> > reached.
> 
> But that doesn't do what we want. We want to rethrow the __forced_unwind 
> exception so that it terminates the thread, but not the entire application.

I was referring to the original implementation which did

   catch (...) {
       std::reminate();
       // forced rethrow of a __forced_unwind is never reached
   }

making an explicit catch block for __forced_unwind necessary to avoid the call 
to std::terminate().

HTCTU,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - Qt, C++ and OpenGL Experts



More information about the Development mailing list