Snow Leopard 的新“突然终止”功能是否有缺点?机制?

发布于 2024-09-30 04:46:19 字数 473 浏览 1 评论 0原文

Snow Leopard 有一项我从未听说过的新技术。突然终止(请参阅 这个 Apple 文档)显然是一种机制,用于告诉系统何时可以残酷地杀死您的应用程序,而不是通过标准退出机制。这应该有助于更快地注销/断电/休眠。

首先,我不知道它,没有看到这里或任何地方讨论它,所以:它被广泛使用吗?典型的用例是什么(我想象简单的实用程序应用程序没有用户文档或信息可保存)?

其次,应用程序可以随时发出信号表明杀死它是不安全的,因此看起来这种机制并没有真正的缺点(当然,除了发出安全/不安全信号时可能存在的错误)。我是否忽略了任何明显的事情?

So there's one piece of technology new to Snow Leopard that I haven't heard of. Sudden termination (see Sudden termination in this Apple doc) is apparently a mechanism for telling the system when it is OK for your application to be killed brutally instead of going through the standard quitting mechanism. This is supposed to help faster log-off/power-off/hibernation.

First, I didn't know about it, didn't see it discussed here or anywhere, so: Is it used widely? What are the typical use cases (I imagine simple utility apps with no user documents or information to save)?

Second, the app can at anytime signal that it's unsafe to kill it, so it looks like there isn't really a drawback to this mechanism (except, of course, possible bugs in signaling safe/unsafe moments). Am I overlooking anything obvious?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

白芷 2024-10-07 04:46:19

Apple 邮件列表中有一些提及,例如: http ://lists.apple.com/archives/cocoa-dev/2009/Sep/msg00113.html

当然,您可以在带有用户文档的应用程序中使用它。正如你所说,该应用程序可以在它准备好或未准备好被核武器攻击时发出信号,因此如果有任何未保存的文档,它可以只说“请不要杀我”。当然,您也可以考虑某种自动保存方案,这将使您的应用程序不易崩溃,并且对突然终止更友好。

There have been a few mentions in Apple mailing lists, such as: http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg00113.html

Certainly you can use it in an app with user documents. As you say, the app can signal when it is or is not ready to be nuked, so it can just say "please don't kill me" if there are any unsaved documents. Of course you could also consider some kind of auto-saving scheme, which would make your app less vulnerable to crashes as well as more friendly to sudden termination.

稚气少女 2024-10-07 04:46:19

Apple 内部的目标是几乎所有进程都应该随时突然终止。所有流程都可以而且应该使用它。用例:一切!

突然终止是苹果雪豹页面上“更快关闭”部分的幕后黑手。

Internally to Apple, the goal was that almost all processes should be suddenly terminable almost all of the time. It is something that all processes can and should use. Use case: everything!

Sudden termination is behind the "faster to shutdown" section on Apple's Snow Leopard page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文