Skip to content

Commit 1f9a340

Browse files
author
Oriental Sensation
committed
Add getThreadPool() method to return current thread pool used.
1 parent 6077c6a commit 1f9a340

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/src/main/java/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ public void setThreadPool(ThreadPoolExecutor threadPool) {
338338
this.threadPool = threadPool;
339339
}
340340

341+
/**
342+
* Returns the current executor service used. By default,
343+
* Executors.newFixedThreadPool() is used.
344+
*
345+
* @return current executor service used
346+
*/
347+
public ExecutorService getThreadPool() {
348+
return threadPool;
349+
}
350+
341351
/**
342352
* Simple interface method, to enable or disable redirects. If you set manually RedirectHandler
343353
* on underlying HttpClient, effects of this method will be canceled.

0 commit comments

Comments
 (0)