public WaitResultInstruction() { var ch = Chan <T> .Make(); ch.Receive( (result, ok) => { if (ok) { _result = result; } _keepWaiting = false; } ); }
public ForInstruction(Action <T> onReceive) { var ch = Chan <T> .Make(); ch.Receive( (t, ok) => { if (!ok) { _keepWaiting = false; return; } onReceive(t); } ); }