Skip to content

Do not reset kvikio thread pool when nthreads is unchanged - #1032

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
Matt711:imp/cpp/dont-reset-pool-when-nthreads-unchanged
Aug 13, 2026
Merged

Do not reset kvikio thread pool when nthreads is unchanged#1032
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
Matt711:imp/cpp/dont-reset-pool-when-nthreads-unchanged

Conversation

@Matt711

@Matt711 Matt711 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

When set_thread_pool_nthreads, we reset the thread pool which drains and detroys the previous one. We avoid that if the number of threads we are setting is unchanged.

See

void defaults::set_thread_pool_nthreads(unsigned int nthreads)
{
  KVIKIO_EXPECT(
    nthreads > 0, "number of threads must be a positive integer", std::invalid_argument);
  thread_pool().reset(nthreads, make_thread_pool_init_task("kvikio"));
}

xref NVIDIA/cudf#23634

@Matt711
Matt711 requested a review from a team as a code owner August 13, 2026 13:23
@Matt711 Matt711 added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Aug 13, 2026
@kingcrimsontianyu

Copy link
Copy Markdown
Contributor

Thanks for the improvement.

@kingcrimsontianyu

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 49157b0 into rapidsai:main Aug 13, 2026
67 checks passed
@Matt711
Matt711 deleted the imp/cpp/dont-reset-pool-when-nthreads-unchanged branch August 13, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants