ballerina-lang
ballerina-lang copied to clipboard
[2201.9.x] Fix worker send hangs when worker early return within if stmt
Purpose
$title
Fixes #42555
Approach
Describe how you are implementing the solutions along with the design details.
Samples
Provide high-level details about the samples related to this feature.
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [x] Unit Tests
- [ ] Spec Conformance Tests
- [ ] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples
This PR addresses the case 1 mentioned in the original problem.
import ballerina/io;
import ballerina/lang.'error as e;
public function main() {
io:println("main called");
worker w1 {
io:println("w1");
boolean b = true;
if (b) {
return;
} else {
30 -> w2;
}
}
worker w2 {
io:println("w2");
int|e:NoMessage m = <- w1;
io:println(m);
}
wait w2;
}
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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 76.85%. Comparing base (
8e138bc
) to head (da72485
). Report is 235 commits behind head on 2201.9.x.
Additional details and impacted files
@@ Coverage Diff @@
## 2201.9.x #42565 +/- ##
==============================================
+ Coverage 76.79% 76.85% +0.06%
- Complexity 53975 54049 +74
==============================================
Files 2924 2925 +1
Lines 203960 204145 +185
Branches 26600 26633 +33
==============================================
+ Hits 156638 156905 +267
+ Misses 38780 38682 -98
- Partials 8542 8558 +16
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
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.