1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-23 15:27:35 +00:00
serenity/Libraries/LibThread
Andrew Kaster 644f5ec160 LibThread: Give Thread std::jthread semantics
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? :)
2020-12-31 21:59:20 +01:00
..
BackgroundAction.cpp Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
BackgroundAction.h Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
CMakeLists.txt Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Lock.h LibThread: Lockable - add forwarding constructor 2020-08-14 18:15:10 +02:00
Thread.cpp LibThread: Give Thread std::jthread semantics 2020-12-31 21:59:20 +01:00
Thread.h LibThread: Hide Thread's constructor, as it is a Core::Object 2020-12-31 21:59:20 +01:00