Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maryam Ziyad <maryamziyadm@gmail.com>
  • Loading branch information
poorna2152 and MaryamZi committed Sep 6, 2024
1 parent 7350613 commit 61e5135
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/multiple-receive/multiple_receive.bal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function fetch(string workerParam) returns string|error {
}

public function main() {
// Workers `w1` and `w2` fetch content using the respective arguments.
// Workers `w1` and `w2` call the `fetch` function to retrieve content. The workers
// send the result of calling the `fetch` function to the default worker.
worker w1 {
fetch("w1") -> function;
}
Expand All @@ -30,7 +31,7 @@ public function main() {
fetch("w2") -> function;
}

// The worker waits until both values are received.
// The multiple receive action is used to receive values from both workers.
Result result = <- {a: w1, b: w2};
io:println(result);
}

0 comments on commit 61e5135

Please sign in to comment.