mirror of https://gitee.com/bigwinds/arangodb
delete jobs after deleting all threads
This commit is contained in:
parent
8685a6a250
commit
dc82cf3a65
|
@ -271,7 +271,7 @@ void DispatcherQueue::beginShutdown () {
|
|||
}
|
||||
}
|
||||
|
||||
// no try to get rid of the remaining jobs
|
||||
// now try to get rid of the remaining jobs
|
||||
MUTEX_LOCKER(_hazardLock);
|
||||
|
||||
for (size_t i = 0; i < _maxSize; ++i) {
|
||||
|
@ -302,7 +302,6 @@ void DispatcherQueue::beginShutdown () {
|
|||
_hazardPointer = nullptr;
|
||||
|
||||
removeJob(job);
|
||||
delete job;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,6 +362,15 @@ void DispatcherQueue::shutdown () {
|
|||
delete it;
|
||||
}
|
||||
}
|
||||
|
||||
// and delete old jobs
|
||||
for (size_t i = 0; i < _maxSize; ++i) {
|
||||
Job* job = _jobs[i];
|
||||
|
||||
if (job != nullptr) {
|
||||
delete job;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue