如何在Realm(iOS)中进行写入操作同步? [英] How do I make a write operation in Realm (iOS) synchronous?
本文介绍了如何在Realm(iOS)中进行写入操作同步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
作为两步分析过程的一部分,我需要在第二步开始之前将数据写入持久性存储.如果我通过国际泳联谷物通知异步进行此操作,则会有些混乱.最好是两个函数在一个函数中串联完成.
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.
是否可以使Realm().write {}操作同步?第二步将需要读回该数据.
Is it possible to make a Realm().write { } opperations synchronous? The second step will need to read this data back.
推荐答案
Realm.write(_:)
是是同步的.
这篇关于如何在Realm(iOS)中进行写入操作同步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文