File tree 1 file changed +10
-1
lines changed
library/src/main/java/com/loopj/android/http
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ public AsyncHttpClient(SchemeRegistry schemeRegistry) {
217
217
218
218
ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager (httpParams , schemeRegistry );
219
219
220
- threadPool = Executors . newCachedThreadPool ();
220
+ threadPool = getDefaultThreadPool ();
221
221
requestMap = new WeakHashMap ();
222
222
clientHeaderMap = new HashMap ();
223
223
@@ -348,6 +348,15 @@ public ExecutorService getThreadPool() {
348
348
return threadPool ;
349
349
}
350
350
351
+ /**
352
+ * Get the default threading pool to be used for this HTTP client.
353
+ *
354
+ * @return The default threading pool to be used
355
+ */
356
+ protected ExecutorService getDefaultThreadPool () {
357
+ return Executors .newCachedThreadPool ();
358
+ }
359
+
351
360
/**
352
361
* Simple interface method, to enable or disable redirects. If you set manually RedirectHandler
353
362
* on underlying HttpClient, effects of this method will be canceled.
You can’t perform that action at this time.
0 commit comments