mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
8d336d2a25
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`. |
||
---|---|---|
.. | ||
BackgroundAction.cpp | ||
BackgroundAction.h | ||
CMakeLists.txt | ||
ConditionVariable.h | ||
Forward.h | ||
Mutex.h | ||
MutexProtected.h | ||
RWLock.h | ||
RWLockProtected.h | ||
Thread.cpp | ||
Thread.h | ||
ThreadPool.h | ||
WorkerThread.h |