waitUntilLiveOrFailure

abstract suspend fun waitUntilLiveOrFailure(): Either<CoreFailure, Unit>

If Sync is ongoing, suspends the caller until it reaches a terminal state.

Return

CoreFailure in case Sync was not started or reached a failure, or Unit in case IncrementalSyncStatus.Live is reached.