elizarov
06/04/2017, 1:53 PMwaiFor just waitFor(predecessors: Tasks) = predecessors.forEach { it.await() } works just as finenkiesel
06/04/2017, 4:25 PMelizarov
06/05/2017, 8:12 PMnkiesel
06/06/2017, 7:35 AMelizarov
06/06/2017, 7:52 AMexecute(recipe) that takes a recipe and performs whatever action is needed. Each recipe has a list of predecessor recipes. I suggest to keep a Map<Recipe, Job> that is lazily initialised. When a task has predecessors it looks up or creates a jobs for them, then waits on their jobs before executing its own recipe.elizarov
06/06/2017, 7:53 AMnkiesel
06/06/2017, 9:17 AMelizarov
06/06/2017, 9:18 AMasync(context) { awaitPredecessors(); execute(receipe) }nkiesel
06/06/2017, 11:21 PMelizarov
06/07/2017, 5:54 AMnkiesel
06/07/2017, 6:37 AM