ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

[2201.9.x] Fix worker send hangs when worker early return within if stmt

Open gabilang opened this issue 10 months ago • 2 comments

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

gabilang avatar Apr 17 '24 05:04 gabilang

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;
}

gabilang avatar Apr 17 '24 07:04 gabilang

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[bot] avatar May 02 '24 19:05 github-actions[bot]

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.

codecov[bot] avatar May 27 '24 14:05 codecov[bot]

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[bot] avatar Jun 20 '24 19:06 github-actions[bot]

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[bot] avatar Jul 07 '24 19:07 github-actions[bot]