备份问题

This commit is contained in:
HapeLee
2026-05-31 01:25:28 +08:00
parent f0fe3875ab
commit c63cf8921d
@@ -0,0 +1,15 @@
package io.legado.app.help.storage
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
internal object BackupRestoreLock {
private val mutex = Mutex()
suspend fun <T> withLock(action: suspend () -> T): T {
return mutex.withLock {
action()
}
}
}