简体   繁体   English

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

[英]WP7 Calling NotifyComplete() after 25 seconds on a PeriodicTask

I'm trying to understand why the NotifyComplete() method gets called even after the 25 second limit for a periodic task execution. 我试图理解为什么即使在周期性任务执行的25秒限制之后也会调用NotifyComplete()方法。

I understand that if notifyComplete() is not called befere 25 seconds, the task is killed, but this is not what is happening. 据我所知,如果在25秒内没有调用notifyComplete(),则该任务将被终止,但这不是正在发生的事情。 NotifyComplete() is still get called after 60 seconds. 60秒后仍会调用NotifyComplete()。

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

Any Ideas?, I'm missunderstanding in some way the way the background agents work? 任何想法?,我在某种程度上误解后台代理的工作方式? Thanks! 谢谢!

If it happens while debugging. 如果在调试时发生。

When running under the debugger, the memory and run-time constraints are ignored by the Windows Phone operating system. 在调试器下运行时,Windows Phone操作系统会忽略内存和运行时约束。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM