ladybird/Userland/Libraries/LibThreading
Braydn 8d336d2a25 LibThreading: Adjust ThreadPoolLooper m_busy_count sections
The `ThreadPoolLooper` should increment `m_busy_count` before attempting
to access the global queue. Otherwise, there exists a possible race
condition where `wait_for_all` checks the exit conditions before the
looper increments `m_busy_count` but after it empties the `ThreadPool`
queue.

Next, incrementing / decrementing `m_busy_count` is moved to be the
responsibility of `ThreadPoolLooper`. Otherwise, it is possible that
decrementing `m_busy_count` in the caller of `Looper::next` causes
`m_busy_count` to underflow if the call to `Looper::next` returns
before incrementing `m_busy_count`.
2024-08-19 03:08:04 +02:00
..
BackgroundAction.cpp LibThreading: Guard closing the background thread on the thread existing 2024-07-25 20:55:31 +01:00
BackgroundAction.h Userland: Add ESCAPING annotations to a bunch of places 2024-05-22 21:55:34 -06:00
CMakeLists.txt Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
ConditionVariable.h LibThreading: Remove unused include of <sys/cdefs.h> 2022-12-20 11:04:05 +01:00
Forward.h LibThreading: Create WorkerThread class run a single task concurrently 2023-04-23 23:14:30 +02:00
Mutex.h Userland: Remove some SerenityOS checks 2024-06-10 13:53:01 +02:00
MutexProtected.h LibThreading: Expose the ProtectedType alias 2024-05-20 08:03:35 +02:00
RWLock.h LibThreading: Add RWLock and RWLockedProtected 2024-05-20 08:03:35 +02:00
RWLockProtected.h LibThreading: Add RWLock and RWLockedProtected 2024-05-20 08:03:35 +02:00
Thread.cpp Userland: Remove some SerenityOS checks 2024-06-10 13:53:01 +02:00
Thread.h Userland: Add ESCAPING annotations to a bunch of places 2024-05-22 21:55:34 -06:00
ThreadPool.h LibThreading: Adjust ThreadPoolLooper m_busy_count sections 2024-08-19 03:08:04 +02:00
WorkerThread.h LibThreading: Create WorkerThread class run a single task concurrently 2023-04-23 23:14:30 +02:00