Skip to content

Commit 0ebece0

Browse files
kimishpatelfacebook-github-bot
authored andcommitted
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
1 parent b5f950b commit 0ebece0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extension/threadpool/threadpool.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ class ThreadPool final {
4242
* is a private API, which will later be replaced by something that allows
4343
* creating of threadpool with requested size and use such a threadpool with
4444
* backend delegates, custom ops or optimized lib.
45+
* For Meta internal use, there is
46+
* executorch::extension::threadpool::UseNThreadsThreadPoolGuard API that
47+
* provides a safer way to select a subset of threads, from threadpool, to run
48+
* the model on.
4549
*/
46-
[[deprecated("This API is experimental and may change without notice.")]]
50+
[[deprecated(
51+
"This API is experimental and may change without notice. Consider using UseNThreadsThreadPoolGuard")]]
4752
bool _unsafe_reset_threadpool(uint32_t num_threads);
4853

4954
/**

0 commit comments

Comments
 (0)