4
votes

I'm developing an app for Windows Phone. This app uses background agent (scheduled task).

The main app stores some settings with help of IsolatedStorageSettings.ApplicationSettings. And background agent sometimes can only read values from settings.

The question is should I use Mutex to synchronize operations on IsolatedStorageSettings between the main app and the background agent? Or this is not needed in my scenario?

1

1 Answers

6
votes

Yes. More...

For Periodic and Resource-intensive Agents: Use LINQ 2 SQL or a file in isolated storage that is guarded with a Mutex. For one-direction communication where the foreground application writes and the agent only reads, we recommend using an isolated storage file with a Mutex. We recommend that you do not use IsolatedStorageSettings to communicate between processes because it is possible for the data to become corrupt.

Easy way to do this:

Easy way to save game in WP7 Silverlight?