mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 15:27:35 +00:00
![]() Because pthread_create will always call pthread_exit internally before exiting the thread function, we can remove the odd requirement that the user's thread function must call Thread::quit internally. Make Thread::join clear m_tid on success, and print to stderr on failure. Call join from ~Thread(). Now if you write an infinite loop in your thread in an application and don't have an exit condition, you will block in the thread's destructor forever. Time for stop_token? :) |
||
---|---|---|
.. | ||
BackgroundAction.cpp | ||
BackgroundAction.h | ||
CMakeLists.txt | ||
Lock.h | ||
Thread.cpp | ||
Thread.h |