mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-26 19:22:30 -05:00
644f5ec160
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 |