Add worker_threads setting

This commit is contained in:
King_DuckZ 2020-08-11 01:33:11 +01:00
parent d0a41d916a
commit 3866462ff5
7 changed files with 56 additions and 12 deletions

View file

@ -43,12 +43,11 @@ void join(roar11::ThreadPool& pool) {
} //unnamed namespace
void test(oro::Api* api, oro::OriginsDB* db) {
void test(oro::Api* api, oro::OriginsDB* db, std::size_t thread_count) {
typedef TimerOroApi<&oro::Api::market_list> TimerShops;
typedef TimerOroApi<&oro::Api::items_list> TimerItems;
typedef TimerOroApi<&oro::Api::items_icons> TimerIcons;
const std::size_t thread_count = 2U; //std::min(std::max(3U, std::thread::hardware_concurrency()) - 1, 4U);
std::cout << "Running with " << thread_count << " worker threads\n";
roar11::ThreadPool pool(thread_count);
eve::Eventia worker;