Skip to content

Commit fe82e54

Browse files
author
Steven Moreland
committed
binder_process.h: clarify thread start behavior
Be explicit that joinThreadPool does not also start the threadpool. Bug: N/A (email thread) Change-Id: I0572dfbdbf152502fbde6f8cdd624b5b2025459f Test: N/A
1 parent 382fc4d commit fe82e54

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

libs/binder/ndk/include_platform/android/binder_process.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ void ABinderProcess_startThreadPool(void);
4747
* be called once before startThreadPool. The number of threads can never decrease.
4848
*
4949
* This count refers to the number of threads that will be created lazily by the kernel, in
50-
* addition to the threads created by ABinderProcess_startThreadPool or
51-
* ABinderProcess_joinThreadPool.
50+
* addition to the single threads created by ABinderProcess_startThreadPool (+1) or
51+
* ABinderProcess_joinThreadPool (+1). Note: ABinderProcess_startThreadPool starts a thread
52+
* itself, but it also enables up to the number of threads passed to this function to start.
53+
* This function does not start any threads itself; it only configures
54+
* ABinderProcess_startThreadPool.
5255
*
5356
* Do not use this from a library. Apps setup their own threadpools, and otherwise, the main
5457
* function should be responsible for configuring the threadpool for the entire application.
@@ -63,8 +66,8 @@ bool ABinderProcess_setThreadPoolMaxThreadCount(uint32_t numThreads);
6366
bool ABinderProcess_isThreadPoolStarted(void);
6467
/**
6568
* This adds the current thread to the threadpool. This thread will be in addition to the thread
66-
* started by ABinderProcess_startThreadPool and the lazy kernel-started threads specified by
67-
* ABinderProcess_setThreadPoolMaxThreadCount.
69+
* configured with ABinderProcess_setThreadPoolMaxThreadCount and started with
70+
* ABinderProcess_startThreadPool.
6871
*
6972
* Do not use this from a library. Apps setup their own threadpools, and otherwise, the main
7073
* function should be responsible for configuring the threadpool for the entire application.

0 commit comments

Comments
 (0)