void PollThread:: run() { isDone = false; th = std::thread([=] { startPolling(); while(!isDone) poll(100); stopPolling(); }); }
void XDKSensor::enable(bool enabled) { Poco::Mutex::ScopedLock lock(_mutex); if (enabled) { startPolling(); } else { stopPolling(); } _enabled = enabled; }
void ControllerManager::slotShutdown() { stopPolling(); // Clear m_enumerators before deleting the enumerators to prevent other code // paths from accessing them. QMutexLocker locker(&m_mutex); QList<ControllerEnumerator*> enumerators = m_enumerators; m_enumerators.clear(); locker.unlock(); // Delete enumerators and they'll delete their Devices foreach (ControllerEnumerator* pEnumerator, enumerators) { delete pEnumerator; } // Stop the processor after the enumerators since the engines live in it m_pThread->quit(); }
void XDKSensor::onDisconnected() { stopPolling(); }
void YoutubeController::delogin() { //o2youtube_->unlink(); stopPolling(); o2youtube_->unlink(); }