Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parallel execution
val leftChain = WorkManager.getInstance(context)
.beginWith(task1)
.then(task2)
val rightChain = WorkManager.getInstance(context)
.beginWith(task3)
.then(task4)
val resultChain = WorkContinuation
.combine(listOf(leftChain, rightChain))
.then(task5)
resultChain.enqueue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment