mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-01 00:09:58 -05:00
Make use of new thread priority scheme
Updated Ghoul repository
This commit is contained in:
@@ -92,11 +92,9 @@ return {
|
||||
Body = "ROSETTA",
|
||||
Frame = "GALACTIC",
|
||||
Observer = "CHURYUMOV-GERASIMENKO",
|
||||
-- 3 Dummy values for compilation:
|
||||
TropicalOrbitPeriod = 20000.0,
|
||||
EarthOrbitRatio = 2,
|
||||
DayLength = 25,
|
||||
-- End of Dummy values
|
||||
RGB = { 0.9, 0.2, 0.9 },
|
||||
Textures = {
|
||||
Type = "simple",
|
||||
|
||||
+1
-1
Submodule ext/ghoul updated: 3ef4b9e9e4...5c9f358af8
@@ -27,6 +27,7 @@
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/misc/thread.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
@@ -274,13 +275,14 @@ void DownloadManager::downloadRequestFilesAsync(const std::string& identifier,
|
||||
if (_useMultithreadedDownload) {
|
||||
std::thread t = std::thread(downloadFunction);
|
||||
|
||||
#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, ghoul::thread::ThreadPriority::Lowest);
|
||||
//#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
|
||||
|
||||
t.detach();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user