<@U3669PPNG> There is no need to overcomplicate `w...
# coroutines
n
@nkiesel There is no need to overcomplicate
waiFor
just
waitFor(predecessors: Tasks) = predecessors.forEach { it.await() }
works just as fine 2 replies Yes, works as expected. Thanks. I actually changed it to
suspend fun Tasks.await() = forEach { it.await() }
. One problem with this approach is that I need to create tasks in their topological order / partially sorted. Would be nicer if I could hide this (i.e. somehow allow callers to add nodes and edges of the dependency graph in any order). Any ideas? or Is there another coroutine construct that would no rely on the topological order?