Impl.PipeSession.ask.polled: def of bend-pipe-session@0.2.0.0 Import: import bend-pipe-session@0.2.0.0/impl.bend as Impl Lines 168-185 of bend-pipe-session@0.2.0.0/impl.bend: https://jend.leeeet.dev/read.txt?path=bend-pipe-session@0.2.0.0/impl.bend&start_line=168&end_line=185 import Base import bend-stdio-pipes@0.2.0.0/impl.bend as Stdio def PipeSession.ask.polled( +pid: U32, +chan: Chan(PipeSession.Answer()), polled: Poll<&1, &1, Maybe<&1, PipeSession.Answer()>, Unit> ) -> IO(Maybe): match polled: case Ready{Some{answer}}: do IO>: Chan.close(PipeSession.Answer(), chan) return Some{answer} case Ready{None{}}: IO.pure(Maybe, None{}) case Wait{_}: do IO>: killed: Result<&1, &1, U32 & String, Unit> <- Stdio.kill(pid) late: Maybe<&1, PipeSession.Answer()> <- Chan.recv(PipeSession.Answer(), chan) Chan.close(PipeSession.Answer(), chan) PipeSession.ask.late(late) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.close https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.recv https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Poll https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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=bend-pipe-session@0.2.0.0/impl.bend&name=PipeSession.Answer https://jend.leeeet.dev/definition.txt?path=bend-pipe-session@0.2.0.0/impl.bend&name=PipeSession.ask.late https://jend.leeeet.dev/definition.txt?path=bend-stdio-pipes@0.2.0.0/impl.bend&name=kill