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

parallel access of database

Mar 25, 2011 at 4:38 AM


I have a case of downloading and saving records in database , which is in thread.

And in Main thread i try to read records or save some other type of records.

Some times this works fine, and sometimes throws exception (when thread running and tombstoned etc).

Do I need to synchronize or database operations are already synchronized?

Mar 25, 2011 at 11:30 AM

Database operations are synchronized to the table instance level as well as the collection level. It should handle your scenario but as always if it is not, let me know some tips on how I can reproduce it and I'll dig into it deeper. There is a "SaveAsync" set of tests that attempts to do things like saving/loading simultaneously, that is the test I'd build on if it's not hitting your case.