This project has moved and is read-only. For the latest updates, please go here.

Isolated storage thread safety

Apr 20, 2011 at 3:49 PM


what I do is after getting a synchronize message from the server, I use SaveAsync to update several tables simultanously. Every now and then I encounter an IsolatedStorageException stating "An error occurred while accessing IsolatedStorage.".

This occurs in IsoStorageHelper.EnsureDirectory at the line _iso.CreateDirectory(path);


I've tried to use lock on that line and haven't seen that exception since then.

Would you be so kind to take a look into that and maybe confirm the issue? Also, would it be the best solution to just lock that line?

Apr 20, 2011 at 3:52 PM

I'll look into it. There is already a PathLock mechanism that locks the full path but this appears to be a contention issue with the directory. I'll take a look and let you know, thanks.

Apr 21, 2011 at 8:53 PM

The latest check in now locks down to the directory path as well. Let me know if you still receive an issue working with this. Thanks.

Apr 21, 2011 at 11:20 PM

I've updated to the latest build now. Haven't seen the issue since.

Thanks for the quick response and fix!


Also thanks for the overall great work!