What happens to tasks in dispatch queues when an app enters inactive/background/suspended states in iOS?

試著忘記壹切 提交于 2019-12-03 10:54:40

When an app is suspended, the entire process is frozen. You can count on the process resuming as if nothing happened at all once it is resumed. Your apps's GCD logical queues don't go away, they remain as they were in memory. And the threads GCD had created in your process to service your queues are resumed in place as if nothing happened as well.

So your interpretation is incorrect: tasks existing in pre-suspension GCD queues do not disappear upon resumption. They never went away; they were only paused.

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