ladybird/Libraries/LibThread
Andrew Kaster 8d0b4657e7 LibThread: Improve semantics of Thread::join, and remove Thread::quit.
Thread::quit was created before the pthread_create_helper in pthread.cpp
that automagically calls pthread_exit from all pthreads after the user's
thread function exits. It is unused, and unecessary now.

Cleanup some logging, and make join return a Result<T, ThreadError>.
This also adds a new type, LibThread::ThreadError as an
AK::DistinctNumeric. Hopefully, this will make it possible to have a
Result<int, ThreadError> and have it compile? It also makes it clear
that the int there is an error at the call site.

By default, the T on join is void, meaning the caller doesn't care about
the return value from the thread.

As Result is a [[nodiscard]] type, also change the current caller of
join to explicitly ignore it.

Move the logging out of join as well, as it's the user's
responsibility whether to log or not.
2021-01-01 23:01:48 +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: Improve semantics of Thread::join, and remove Thread::quit. 2021-01-01 23:01:48 +01:00
Thread.h LibThread: Improve semantics of Thread::join, and remove Thread::quit. 2021-01-01 23:01:48 +01:00