Sender-Buffer-Receiver system
Communication diagram
Code layer
agent S { i :: Int = 1; loop { i = 1; out push i; }} agent R { i :: Int = 0; loop { in pop i; i = 0; }} agent B { i :: Int = 0; proc (i /= 0) pop { out pop i; i = 0; } proc (i == 0) push { in push i; }}