Schedule.execute_with_barrier: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/schedule.bend as Schedule Lines 88-93 of bendvy-ecs-core@0.1.0.4/schedule.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&start_line=88&end_line=93 import Base import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/system.bend as Sys def execute_with_barrier(~S: Data,~C: Type,~R: Type,~E: Data,~H: Type,~Error: Data,~dispatch: H -> W.World -> U32 -> H & Sys.Outcome,Error,Unit>,~condition: W.World -> U32 -> W.World & Bool,~barrier:H -> W.World -> H & W.World,steps: List<&2,Step>,owners: H,world: W.World,+namespace: U32,+name: String,+all: List<&2,Step>,+observations: List<&2,Observation>) -> RunResult: match steps: case []: Finished{Schedule{namespace,name,all,owners},world,observations} case Phase{phase} <> rest: execute_with_barrier(~S,~C,~R,~E,~H,~Error,~dispatch,~condition,~barrier,rest,owners,world,namespace,name,all,List.append(&2,Observation,observations,[Entered{phase}])) case Barrier{} <> rest: after_skip(~S,~C,~R,~E,~H,~Error,h => w => obs => execute_with_barrier(~S,~C,~R,~E,~H,~Error,~dispatch,~condition,~barrier,rest,h,w,namespace,name,all,obs),barrier(owners,world),List.append(&2,Observation,observations,[Applied{}])) case System{+id,slot} <> rest: after_condition(~S,~C,~R,~E,~H,~Error,~dispatch,h => w => obs => execute_with_barrier(~S,~C,~R,~E,~H,~Error,~dispatch,~condition,~barrier,rest,h,w,namespace,name,all,obs),condition(world,slot),owners,namespace,name,all,observations,id) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=Observation https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=RunResult https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=Schedule https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=after_condition https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schedule.bend&name=after_skip https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/system.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=World