当机器人杀死一个应用程序,可以在函数被中途停止? [英] When Android kills an app, can a function be stopped halfway?

查看:72
本文介绍了当机器人杀死一个应用程序,可以在函数被中途停止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道:如果一个应用程序被打死,确实安卓等待当前正在运行的函数返回,还是机器人停止之前自行终止

I am wondering: when an app is to be killed, does Android wait for the currently running function to return, or does Android stop it before it ends by itself?

推荐答案

操作系统杀死了JVM进程,在所有线程所有的功能。实际上,你不应该假设一个方法是事务。相反,应该认为它可以在任何时间和设计被适当地终止。

The OS kills the JVM process, with all the "functions" in all the threads. In practical terms, you shouldn't assume that a method is a transaction. Instead, one should assume it can be terminated at any time and design appropriately.

这篇关于当机器人杀死一个应用程序,可以在函数被中途停止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆