mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +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 |