This differential implements utils to avoid data races between the main app and the notifs code. By default MMKV synchronizes only for a single operation (read , write or removal). Unfortunately this opens the gate for data races against notif encryption and decryption that happen on different thread/proces and involve reading and writing back the state of the olm session.
MMKV exposes public methods to lock and unlock the database for the sequence of operations. I wasn't aware of them since they are not mentioned in the documentation so I had to dig them up in the code.