diff --git a/examples/multiple-receive/multiple_receive.bal b/examples/multiple-receive/multiple_receive.bal index b163ae9c77..60272d287d 100644 --- a/examples/multiple-receive/multiple_receive.bal +++ b/examples/multiple-receive/multiple_receive.bal @@ -16,12 +16,12 @@ public function main() { 3 -> w3; } - worker w3 returns Result { + worker w3 returns json { // The worker waits until both values are received. Result result = <- {a: w1, b: w2}; - return result; + return result.toJson(); } - Result result = wait w3; + json result = wait w3; io:println(result); } diff --git a/examples/multiple-receive/multiple_receive.md b/examples/multiple-receive/multiple_receive.md index 7127e80fca..62a824eb3b 100644 --- a/examples/multiple-receive/multiple_receive.md +++ b/examples/multiple-receive/multiple_receive.md @@ -1,6 +1,6 @@ # Multiple receive -The multiple receive action can be used to receive values from multiple send actions. It operates by awaiting the receipt of values from all the send actions, subsequently constructing a map containing those values. +The multiple receive action can be used to receive values corresponding to multiple send actions. It operates by waiting for the receipt of values from all the send actions, subsequently constructing a mapping value containing those values. ::: code multiple_receive.bal :::