With Mango, it’s possible to create a scheduled task to update the ShellTiles data.
It’s up to the task to call NotifyComplete() when it’s done.
Given that I/O on the phone should be asynchronous, how do you ensure that your I/O is complete prior to calling NotifyComplete()?
Via synchronization primatives? Or will the I/O be allowed to complete once the Task has notified the phone’s OS it’s complete?
Sync primatives is the obvious answer, but on the phone, blocking isn’t really a good choice.
Scheduled tasks are not executed synchronously. They are started and then have 15 seconds to call
NotifyComplete(or abort) before they are forcefully terminated.In direct answer to your question, you would use the asynchronous IO methods and then call
NotifyCompletefrom the complete event or callback.Here’s an example. I’ve used the
Microsoft.Phone.Reactivestuff but you can use Begin/EndGetResponse in the traditional way if you prefer.