2 Jun
2023
2 Jun
'23
11:51 p.m.
Andrey Semashev wrote:
Does cancelling a thread count as a C++ exception, meaning, in particular, does it trigger std::terminate when it leaves a noexcept function?
It does under Linux. Not sure about macOS; I didn't run the test with the noexcept applied but before the fix applied. But even if it doesn't terminate, you still don't want sp_thread_sleep to be a cancelation point because it's typically used in spinlock::lock and you don't want that to be a cancelation point either.