美文网首页
iOS watch dog 机制

iOS watch dog 机制

作者: Maggie的小蜗居 | 来源:发表于2019-06-18 15:22 被阅读0次

为了防止一个应用占用过多系统资源,苹果设计了一个“看门狗”watchdog 机制。

如果超出了该场景规定的运行时间,“看门狗”就会强制kill掉这个应用,在crashlog 会看到 “0x8badf00d”的错误代码~

如果我们的应用程序对一些特定的UI事件(比如启动、挂起、恢复、结束)响应不及时,watchdog会把我们的应用程序干掉,并生成一份crash报告。

https://developer.apple.com/library/archive/technotes/tn2151/_index.html

The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. One common cause of this is doing synchronous networking on the main thread. Whatever operation is on Thread 0 needs to be moved to a background thread, or processed differently, so that it does not block the main thread.

相关文章

  • iOS watch dog 机制

    为了防止一个应用占用过多系统资源,苹果设计了一个“看门狗”watchdog 机制。 如果超出了该场景规定的运行时间...

  • # iOS Crashes 分析

    iOS 崩溃原因 CPU resource Limit CPU 占用率过高 触发watch dog 主线程超过20...

  • NTPS410 Exasmoc在线多变量,模型预测和优化控制器

     Watch dog Timer In order to detect the failure of Exa...

  • 疑惑

    Redisson 分布式锁的watch dog自动续期机制 如果一个业务服务一直执行不结束,或者执行需要很长的时间...

  • 2017-11-15

    watch TV market We saw a big cute dog when we were g...

  • 2015-11-12 政治传播学

    民主需要一个不可爱的新闻界? - watch dog:(望风)监察者、守望者 - guard dog:守门狗 - ...

  • Android ANR Watch Dog

    ANR-WatchDog原理 ANR-WatchDog 单独起一个子线程向主线程发送一个重置变量操作的Runnab...

  • Watch机制

    Watch机制 ZooKeeper 的客户端可以通过 Watch 机制来订阅当服务器上某一节点的数据或状态发生变化...

  • Etcd watch源码阅读

    公司的业务里面使用了Consul做服务发现, 发现其有一个watch机制.这个watch机制引起我的好奇, 因为刚...

  •  Watch开发学习 (二)

    向iOS应用中添加Watch应用 要向现有项目中添加Watch应用对象,请执行以下操作: 打开现有的iOS应用项目...

网友评论

      本文标题:iOS watch dog 机制

      本文链接:https://www.haomeiwen.com/subject/vuufqctx.html