From 0ebece03123d54e4b2d5935c4ca222be364253e8 Mon Sep 17 00:00:00 2001 From: Kimish Patel Date: Thu, 10 Jul 2025 17:34:21 -0700 Subject: [PATCH] Update comment on deprecation warning to point inernal users to use safer API (#12318) Summary: For Meta internal use there is UseNThreadsThreadPoolGuard API to allow users to use a subset of threads. Point users to this API. Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: swolchok Differential Revision: D77973302 --- extension/threadpool/threadpool.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/threadpool/threadpool.h b/extension/threadpool/threadpool.h index 15133befef6..3ad2d1d48d4 100644 --- a/extension/threadpool/threadpool.h +++ b/extension/threadpool/threadpool.h @@ -42,8 +42,13 @@ class ThreadPool final { * is a private API, which will later be replaced by something that allows * creating of threadpool with requested size and use such a threadpool with * backend delegates, custom ops or optimized lib. + * For Meta internal use, there is + * executorch::extension::threadpool::UseNThreadsThreadPoolGuard API that + * provides a safer way to select a subset of threads, from threadpool, to run + * the model on. */ - [[deprecated("This API is experimental and may change without notice.")]] + [[deprecated( + "This API is experimental and may change without notice. Consider using UseNThreadsThreadPoolGuard")]] bool _unsafe_reset_threadpool(uint32_t num_threads); /**