问题
As part of an two step analysis process, I need data to be written to the persistent storage prior to the second step beginning. If I do this asynchronously via fina grain notifications its a bit messy. It would be great two do it in-line in one function.
Is it possible to make a Realm().write { } opperations synchronous? The second step will need to read this data back.
回答1:
Realm.write(_:) is synchronous.
来源:https://stackoverflow.com/questions/38082770/how-do-i-make-a-write-operation-in-realm-ios-synchronous