bool DispatcherQueue::startQueueThread () { DispatcherThread * thread = (*createDispatcherThread)(this, _threadData); if (! _affinityCores.empty()) { size_t c = _affinityCores[_affinityPos]; LOG_DEBUG("using core %d for standard dispatcher thread", (int) c); thread->setProcessorAffinity(c); ++_affinityPos; if (_affinityPos >= _affinityCores.size()) { _affinityPos = 0; } } bool ok = thread->start(); if (! ok) { LOG_FATAL_AND_EXIT("cannot start dispatcher thread"); } else { _nrStarted++; _lastChanged = TRI_microtime(); } return ok; }
bool DispatcherQueue::startQueueThread () { DispatcherThread * thread = (*createDispatcherThread)(this); bool ok = thread->start(); if (! ok) { LOGGER_FATAL_AND_EXIT("cannot start dispatcher thread"); } else { _nrStarted++; } return ok; }
bool DispatcherQueue::startQueueThread () { DispatcherThread * thread = (*createDispatcherThread)(this, _threadData); bool ok = thread->start(); if (! ok) { LOG_FATAL_AND_EXIT("cannot start dispatcher thread"); } else { _nrStarted++; _lastChanged = TRI_microtime(); } return ok; }
void DispatcherQueue::startQueueThread () { DispatcherThread * thread = (*createDispatcherThread)(this); if (! _affinityCores.empty()) { size_t c = _affinityCores[_affinityPos]; LOG_DEBUG("using core %d for standard dispatcher thread", (int) c); thread->setProcessorAffinity(c); ++_affinityPos; if (_affinityPos >= _affinityCores.size()) { _affinityPos = 0; } } { MUTEX_LOCKER(_threadsLock); if (! notEnoughThreads()) { delete thread; return; } _startedThreads.insert(thread); ++_nrRunning; } bool ok = thread->start(); if (! ok) { LOG_FATAL_AND_EXIT("cannot start dispatcher thread"); } else { _lastChanged = TRI_microtime(); } deleteOldThreads(); }