Quick hack to stop core dumps on shutdown. The client needs to be shutdown before

the job queue. This just prevents it from tripping.
This commit is contained in:
JoelKatz
2013-02-11 07:00:09 -08:00
parent 35eb2d71ea
commit 4261b1c2d0

View File

@@ -101,7 +101,9 @@ void JobQueue::addJob(JobType type, const boost::function<void(Job&)>& jobFunc)
assert(type != jtINVALID);
boost::mutex::scoped_lock sl(mJobLock);
assert(mThreadCount != 0); // do not add jobs to a queue with no threads
if (type != jtCLIENT) // FIXME: Workaround incorrect client shutdown ordering
assert(mThreadCount != 0); // do not add jobs to a queue with no threads
mJobSet.insert(Job(type, ++mLastJob, mJobLoads[type], jobFunc));
++mJobCounts[type];