3 ms·
> how do you prevent one thread from seeing another thread's transaction in progress? In Realm this is done by each thread having its own immutable snapshot of
by jinjin2 10y ago
> how do you prevent one thread from seeing another thread's transaction in progress?
In Realm this is done by each thread having its own immutable snapshot of the data which is only advanced to the latest state at very specific "safe" points in the code. The result of this is that data never changes underneath you (i.e. You never see changes from transactions in progress. You only see after they have been atomically applied).