Use named_thread_group in rsx_cache.h
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include "Utilities/hash.h"
|
#include "Utilities/hash.h"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/lockless.h"
|
#include "Utilities/lockless.h"
|
||||||
|
#include "Utilities/Thread.h"
|
||||||
#include "Emu/Memory/vm.h"
|
#include "Emu/Memory/vm.h"
|
||||||
#include "gcm_enums.h"
|
#include "gcm_enums.h"
|
||||||
#include "Common/ProgramStateCache.h"
|
#include "Common/ProgramStateCache.h"
|
||||||
@@ -512,13 +513,10 @@ namespace rsx
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::vector<std::thread> worker_threads(nb_workers);
|
named_thread_group workers("RSX Worker ", nb_workers, [&]()
|
||||||
|
|
||||||
// Start workers
|
|
||||||
for (u32 i = 0; i < nb_workers; i++)
|
|
||||||
{
|
{
|
||||||
worker_threads[i] = std::thread(worker, entry_count);
|
worker(entry_count);
|
||||||
}
|
});
|
||||||
|
|
||||||
u32 current_progress = 0;
|
u32 current_progress = 0;
|
||||||
u32 last_update_progress = 0;
|
u32 last_update_progress = 0;
|
||||||
@@ -536,11 +534,6 @@ namespace rsx
|
|||||||
dlg->inc_value(step, processed_since_last_update);
|
dlg->inc_value(step, processed_since_last_update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::thread& worker_thread : worker_threads)
|
|
||||||
{
|
|
||||||
worker_thread.join();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user