提交 f64c02a5 编写于 作者: G guolindev

Make ktx transaction API synchronized.

上级 347c4e0d
......@@ -625,7 +625,7 @@ fun <T : LitePalSupport> Collection<T>.saveAll() = LitePal.saveAll(this)
* If lambda return true, all db operations in lambda will be committed.
* Otherwise all db operations will be rolled back.
*/
inline fun LitePal.runInTransaction(block: () -> Boolean) {
@Synchronized inline fun LitePal.runInTransaction(block: () -> Boolean) {
beginTransaction()
val succeeded = try {
block()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册