Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2201.9.x] Add conditional-send bbe #5292

Merged

Conversation

poorna2152
Copy link
Contributor

@poorna2152 poorna2152 commented Apr 8, 2024

@LakshanWeerasinghe LakshanWeerasinghe added this to the 2201.9.0 milestone Apr 8, 2024
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.metatags Outdated Show resolved Hide resolved
examples/index.json Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.md Outdated Show resolved Hide resolved
Co-authored-by: lochana-chathura <39232462+lochana-chathura@users.noreply.github.com>
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
examples/conditional-send/conditional_send.bal Outdated Show resolved Hide resolved
return d;
}

int|error:NoMessage w2Result = wait w2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move closer to the relevant workers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not possible because the workers have to be defined first

Comment on lines 30 to 31
// The send action is used in two instances within worker `w3`.
// Therefore, an alternate receive action can be used to receive them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear enough IMO, to relate to conditional send.

@@ -0,0 +1,7 @@
# Conditional send

The send action in workers can be used within a conditional context, allowing for more flexible and dynamic inter-worker communication based on specific conditions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The send action in workers can be used within a conditional context, allowing for more flexible and dynamic inter-worker communication based on specific conditions.
The send action in workers can be used in a conditional context, allowing for more flexible and dynamic inter-worker communication based on specific conditions.

Include something about the receive side too, since it becomes aware that there may not be a message.

@lochana-chathura
Copy link
Member

@poorna2152 I used the same BBE samples for the release note with ballerina-platform/ballerina-dev-website#8902.

Based on ballerina-platform/ballerina-dev-website#8902 (comment), I was able to simplify all the samples. There were a few other suggestions as well.

You can find the diff here. https://github.com/ballerina-platform/ballerina-dev-website/pull/8902/files/6767ee69fe7b536f92f3ff57f74073c72f83e21e..51494121a754545cbdbacafbd9f9088131dfdc49

Hope we can apply them here.

Copy link

sonarcloud bot commented Apr 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

github-actions bot commented May 3, 2024

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label May 3, 2024
@poorna2152 poorna2152 removed the Stale label May 4, 2024
@poorna2152 poorna2152 changed the base branch from master to 2201.9.x May 7, 2024 06:05
@poorna2152 poorna2152 dismissed lochana-chathura’s stale review May 7, 2024 06:05

The base branch was changed.

@poorna2152 poorna2152 changed the title Add conditional-send bbe [2201.9.x] Add conditional-send bbe May 7, 2024
@lochana-chathura lochana-chathura merged commit c4a82b2 into ballerina-platform:2201.9.x May 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants