If an activity is killed, does the AsyncTask live on?

后端 未结 6 1609
你的背包
你的背包 2021-02-18 15:05

I think I know the answer to this, but does an AsyncTask continue to live on once its calling Activity has been finish()ed?

    protected void onPr         


        
6条回答
  •  广开言路
    2021-02-18 15:31

    I've experienced some weirdness with Async Tasks where if an activity is killed by the OS and when the app resumes, the AsyncTasks sometimes do not run at all. I am unsure why they get into this state. If you execute your AsyncTasks in your own executor thread, this does not happen. I might be running into some odd circumstance. Thought it might be useful to post here anyway :).

提交回复
热议问题