加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – WP7在PeriodicTask上25秒后调用NotifyComplete()

发布时间:2020-12-16 01:49:53 所属栏目:百科 来源:网络整理
导读:我试图理解为什么即使在周期性任务执行的25秒限制之后也会调用NotifyComplete()方法. 据我所知,如果在25秒内没有调用notifyComplete(),则该任务将被终止,但这不是正在发生的事情. 60秒后仍会调用NotifyComplete(). protected override void OnInvoke(Schedul
我试图理解为什么即使在周期性任务执行的25秒限制之后也会调用NotifyComplete()方法.

据我所知,如果在25秒内没有调用notifyComplete(),则该任务将被终止,但这不是正在发生的事情. 60秒后仍会调用NotifyComplete().

protected override void OnInvoke(ScheduledTask task)
{ 
    Thread.Sleep(60000); // 60 Seconds
    NotifyComplete();
}

任何想法?,我在某种程度上误解后台代理的工作方式?
谢谢!

解决方法

如果在调试时发生.

When running under the debugger,the memory and run-time constraints are ignored by the Windows Phone operating system.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读