Skip to content

Commit

Permalink
Fix order and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
poorna2152 committed Apr 10, 2024
1 parent 2ea5379 commit 6ab0ccc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions examples/alternate-receive/alternate_receive.bal
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function main() {

worker w6 returns int|error? {
// Alternate receive action waits until a message that is not an error is received.
// Since `w4` returns an error, it waits further and
// sets the value that is received from `w5`.
// Since `w4` returns an error, it waits further and sets the value that is received from `w5`.
int a = check <- w4 | w5;
return a;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/alternate-receive/alternate_receive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Alternate receive

The alternate receive action can be used receive values from several workers. It waits until either a non-error message, a panic termination status on a closed channel, or closure of all channels. Alternate receive actions sets the first non-error value it encounters as the result.
The alternate receive action can be used to receive values from several workers. It operates by waiting until it encounters a non-error message, a panic termination status on a closed channel, or the closure of all channels. Alternate receive action sets the first non-error value it encounters as the outcome.

::: code alternate_receive.bal :::

Expand Down
14 changes: 7 additions & 7 deletions examples/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,13 @@
"verifyOutput": true,
"isLearnByExample": true
},
{
"name": "Alternate receive",
"url": "alternate-receive",
"verifyBuild": true,
"verifyOutput": true,
"isLearnByExample": true
},
{
"name": "Inter-worker failure propagation",
"url": "inter-worker-failure-propagation",
Expand Down Expand Up @@ -1467,13 +1474,6 @@
"verifyBuild": true,
"verifyOutput": true,
"isLearnByExample": true
},
{
"name": "Alternate receive",
"url": "alternate-receive",
"verifyBuild": true,
"verifyOutput": true,
"isLearnByExample": true
}
]
},
Expand Down

0 comments on commit 6ab0ccc

Please sign in to comment.