TaskGraph
A directed acyclic graph (DAG) of tasks with dependency edges.
Unlike TaskChain (sequential), a TaskGraph allows parallel execution of independent tasks that converge at join points.
kmpWorker.graph("pipeline") {
val fetch = task("fetch-data")
val process = task("process")
val validate = task("validate")
val upload = task("upload")
fetch then process // process depends on fetch
fetch then validate // validate runs in parallel with process
process then upload // upload waits for BOTH
validate then upload
}Content copied to clipboard