|
|
|
|
|
by brmunk
3424 days ago
|
|
It's ACID & Serializable. A write will block all other writes, but multiple reads can occur without overhead or blocking due to MVCC.
Reads are consistent within the runloop, but updates to your objects occurs when you start a write transaction, so you know you always work on the latest version of the data. Basically, you are in an implicit read transaction all the time, except when you are in a write transaction :-). > So if I am doing x.first, x.second while the object is being updated in a second thread, will I get mixed state?
So no you will not get mixed state. > Is database crash proof? If the phone runs out of battery while in write transaction, will the database get damaged? Yes it is crashproof. Fully ACID. Any other questions? This article goes a bit more into the details of threading: https://realm.io/news/threading-deep-dive/
And this one more into the core design: https://realm.io/news/jp-simard-realm-core-database-engine/ |
|