diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-04 13:31:30 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-04 13:31:30 +0100 |
commit | c5c44d12073791bb1150445ce48bc57fccbb544d (patch) | |
tree | 9d7704d17cb06f886b0943d1508c9ff08f4b9570 /xpcom/threads/nsThreadPool.cpp | |
parent | a63272b5303b7aef467e974c630f745146fb983a (diff) | |
parent | bbc2206a0fda053a6f5071b457bd209dab9ed268 (diff) | |
download | UXP-c5c44d12073791bb1150445ce48bc57fccbb544d.tar UXP-c5c44d12073791bb1150445ce48bc57fccbb544d.tar.gz UXP-c5c44d12073791bb1150445ce48bc57fccbb544d.tar.lz UXP-c5c44d12073791bb1150445ce48bc57fccbb544d.tar.xz UXP-c5c44d12073791bb1150445ce48bc57fccbb544d.zip |
Merge branch 'master' into certexception-work
Diffstat (limited to 'xpcom/threads/nsThreadPool.cpp')
-rw-r--r-- | xpcom/threads/nsThreadPool.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xpcom/threads/nsThreadPool.cpp b/xpcom/threads/nsThreadPool.cpp index 241fad39d..eb967870a 100644 --- a/xpcom/threads/nsThreadPool.cpp +++ b/xpcom/threads/nsThreadPool.cpp @@ -112,7 +112,9 @@ nsThreadPool::PutEvent(already_AddRefed<nsIRunnable> aEvent, uint32_t aFlags) bool killThread = false; { MutexAutoLock lock(mMutex); - if (mThreads.Count() < (int32_t)mThreadLimit) { + if (mShutdown) { + killThread = true; // we're in shutdown, kill the thread + } else if (mThreads.Count() < (int32_t)mThreadLimit) { mThreads.AppendObject(thread); } else { killThread = true; // okay, we don't need this thread anymore |