feat(sync): добавил cooperative-отмену sync и pipeline-задач

ensureActive в StorageSyncEngine, flush журнала перед чтением, Cancelled
в StorageSyncRunOutcome и TaskContext.ensureNotCancelled.
This commit is contained in:
2026-05-22 13:22:15 +03:00
parent bc2b354820
commit 2618df41e3
8 changed files with 80 additions and 18 deletions

View File

@@ -14,4 +14,7 @@ interface TaskContext {
fun log(level: TaskLogLevel, key: TaskLogKey)
fun fail(error: WallencException): Nothing
/** Проверяет, что задача не отменена; бросает [kotlinx.coroutines.CancellationException] при отмене. */
suspend fun ensureNotCancelled()
}