示例#1
0
文件: poll.cpp 项目: RAttab/slick
void
PollThread::
run()
{
    isDone = false;
    th = std::thread([=] {
                startPolling();
                while(!isDone) poll(100);
                stopPolling();
            });
}
示例#2
0
void XDKSensor::enable(bool enabled)
{
	Poco::Mutex::ScopedLock lock(_mutex);

	if (enabled)
	{
		startPolling();
	}
	else
	{
		stopPolling();
	}
	_enabled = enabled;
}
示例#3
0
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();
}
示例#4
0
void XDKSensor::onDisconnected()
{
	stopPolling();
}
示例#5
0
void YoutubeController::delogin()
{
    //o2youtube_->unlink();
    stopPolling();
    o2youtube_->unlink();
}