问题描述
如果应用程序被暂停,进程内后台任务是否仍在运行?如果我注册了进程外后台任务,如果应用程序处于未运行状态,它仍在运行?对不起,我有点困惑。谢谢。
Is the in-process background task still running if the app is suspended? And if I register out-of-process background task, it is still running if the app is in state Not Running? Sorry I am little bit confused. Thank you.
推荐答案
进程内后台任务仍然在运行当应用程序被暂停时但是,如果在进程后台任务中运行的代码崩溃,它将关闭您的应用程序。如果应用程序未运行,则进程外的后台任务仍在运行,此任务在与应用程序进程不同的进程中运行。
The in-process background taskis still running when the app is suspended. But If the code running in an in-process background task crashes, it will take down your app. The out-of-process background task is still running if the app is not running, this task runs in a separate process than your app's process.
有关 创建并注册进程内后台任务 和 创建和寄存器的过程外的背景任务。
Please refer to MSDN articles for more details about Create and register an in-process background task and Create and register an out-of-process background task.
祝你好运,
Roy