mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Better fix for thread pools
This commit is contained in:
parent
8a733bdbc3
commit
38dbf9928a
1 changed files with 3 additions and 3 deletions
|
|
@ -44,7 +44,7 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
CategoriesAdapter categoriesAdapter;
|
CategoriesAdapter categoriesAdapter;
|
||||||
CategoriesUpdater lastUpdater = null;
|
CategoriesUpdater lastUpdater = null;
|
||||||
MethodAUpdater methodAUpdater = null;
|
MethodAUpdater methodAUpdater = null;
|
||||||
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
|
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(2);
|
||||||
|
|
||||||
private OnCategoriesSaveHandler onCategoriesSaveHandler;
|
private OnCategoriesSaveHandler onCategoriesSaveHandler;
|
||||||
|
|
||||||
|
|
@ -503,8 +503,8 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
lastUpdater = new CategoriesUpdater();
|
lastUpdater = new CategoriesUpdater();
|
||||||
|
|
||||||
//TODO: Only the first one is ever called, why?
|
//TODO: Only the first one is ever called, why?
|
||||||
Utils.executeAsyncTask(lastUpdater);
|
Utils.executeAsyncTask(lastUpdater, executor);
|
||||||
Utils.executeAsyncTask(methodAUpdater);
|
Utils.executeAsyncTask(methodAUpdater, executor);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue