mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
8d0b4657e7
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. |
||
---|---|---|
.. | ||
BackgroundAction.cpp | ||
BackgroundAction.h | ||
CMakeLists.txt | ||
Lock.h | ||
Thread.cpp | ||
Thread.h |