Merge branch 'develop' into release/ips

# Conflicts:
#	ext/ghoul
This commit is contained in:
Alexander Bock
2016-06-22 10:01:48 +02:00
+8 -10
View File
@@ -350,8 +350,11 @@ void DownloadManager::downloadRequestFilesAsync(const std::string& identifier,
};
if (_useMultithreadedDownload) {
using namespace ghoul::thread;
std::thread t = std::thread(downloadFunction);
ghoul::thread::setPriority(t, ghoul::thread::ThreadPriority::Lowest);
ghoul::thread::setPriority(
t, ThreadPriorityClass::Idle, ThreadPriorityLevel::Lowest
);
t.detach();
}
else
@@ -386,16 +389,11 @@ void DownloadManager::getFileExtension(const std::string& url,
}
};
if (_useMultithreadedDownload) {
using namespace ghoul::thread;
std::thread t = std::thread(requestFunction);
#ifdef WIN32
std::thread::native_handle_type h = t.native_handle();
SetPriorityClass(h, IDLE_PRIORITY_CLASS);
SetThreadPriority(h, THREAD_PRIORITY_LOWEST);
#else
// TODO: Implement thread priority ---abock
#endif
ghoul::thread::setPriority(
t, ThreadPriorityClass::Idle, ThreadPriorityLevel::Lowest
);
t.detach();
}
else {