void CurlDownloadManager::stopThreadIfIdle()
{
    MutexLocker locker(m_mutex);

    if (!getActiveDownloadCount() && !getPendingDownloadCount())
        setRunThread(false);
}
void CurlDownloadManager::stopThreadIfIdle()
{
    if (!getActiveDownloadCount() && !getPendingDownloadCount())
        setRunThread(false);
}