当机器人杀死一个应用程序,可以在函数被中途停止?中途、机器人、应用程序、函数

由网友(猖狂在你的世界)分享简介:我想知道:如果一个应用程序被打死,确实安卓等待当前正在运行的函数返回,还是机器人停止之前自行终止I am wondering: when an app is to be killed, does Android wait for the currently running function to return, or...

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

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.

阅读全文

相关推荐

最新文章