How many workers can be created the most?

In my tablet application, I use many fragments (of the same class) next to eachother in one action, and in this fragment class I have:

public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getLoaderManager().initLoader(this.position, null, this); } 

and

 public Loader<Cursor> onCreateLoader(int id, Bundle args) { Uri uri = Uri.withAppendedPath(...) return new CursorLoader(getActivity(), uri, proj, null, null, "distance"); } 

Each fragment launches a new workflow for CursorLoader. How far is this scale?

+4
source share
1 answer

There is no hard limit. However, if you are concerned about the number of threads running, use AsyncTask since its doInBackground method runs in the pool of background threads. Additional Information

+2
source

Source: https://habr.com/ru/post/1381044/


All Articles