help page, number of parallel tasts, source and destination now can be set up from config

This commit is contained in:
Blue 2023-10-09 18:47:00 -03:00
parent 0b268a7245
commit e266008e11
Signed by: blue
GPG key ID: 9B203B252A63EE38
10 changed files with 197 additions and 43 deletions

View file

@ -42,8 +42,11 @@ void TaskManager::start() {
if (running)
return;
const uint32_t num_threads = std::thread::hardware_concurrency();
for (uint32_t ii = 0; ii < num_threads; ++ii)
unsigned int amount = settings->getThreads();
if (amount == 0)
amount = std::thread::hardware_concurrency();
for (uint32_t i = 0; i < amount; ++i)
threads.emplace_back(std::thread(&TaskManager::loop, this));
running = true;