pt1和pt2滤波_利用后台执行力pt 1

pt1和pt2滤波

How to effectively distribute and defer work from the foreground to the background.

如何有效地分配工作并将工作从前台推迟到后台。

Last year Apple's Software Battery Life Team introduced in the WWDC the brand new BackgroundTasks Framework. It's a very lightweight — yet powerful — library, it holds only 7 new classes (2 being abstract). It mainly exposes APIs we can use to schedule tasks to run in the background.

去年,苹果公司的软件电池寿命团队在WWDC中引入了全新的BackgroundTasks框架 。 这是一个非常轻量级但功能强大的库,仅包含7个新类(其中2个是抽象类)。 它主要公开了可用于安排任务在后台运行的API。

Background Tasks isn't a new thing, though. It's been around since iOS 7, with a different — and now deprecated — API. When first introduced, it was aimed to help your app to keep the content up-to-date for the user, a routine named "App Refresh".

但是,后台任务并不是新事物。 自iOS 7以来,就已经有了不同的API(现已不推荐使用)。 首次引入时,它旨在帮助您的应用程序为用户保持内容最新,这是一个名为“ App Refresh”的例程。

The way it works is pretty straightforward — We register handlers for tasks when the app launches and schedule them as required. The system will launch the app in the background and execute these tasks.

它的工作方式非常简单-我们在应用启动时为任务注册处理程序,并根据需要安排它们的时间。 系统将在后台启动该应用程序并执行这些任务。

One of the coolest things about this framework is that it also allows us to leverage the processing power with the CPU monitor off. This can be very useful to you to train CoreML models or any other energy consuming task.

一个关于这个框架中最酷的一点是,它也使我们能够利用 CPU关闭显示器的处理能力。 这对于训练CoreML模型或任何其他耗能的任务非常有用。

By the way — from iOS 13 on, we are able to satisfy several other background execution use cases, such as Discretionary Downloads, Background Pushes and more!

顺便说一下-从iOS 13开始,我们能够满足其他一些后台执行用例,例如自由下载后台推送等等!

This all sounds promising… but how can we adopt it in our App?

这听起来很有希望……但是我们如何在我们的应用程序中采用它呢?

In this article we'll have an overview of this API

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值