Schedule multiple async task in android

家住魔仙堡 提交于 2019-12-05 06:45:55
atok

As AsyncTasks can share a single thread I would try decoupling them by calling:

my_task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[])null);

in place of my_task.execute((Void[])null)

as described in this answer: Android SDK AsyncTask doInBackground not running (subclass)

Another way would be to use Executor framework and ThreadPoolExecutor.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!