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

[Bug]: Async send is not allowed within a lock statement #42584

Open
MaryamZi opened this issue Apr 18, 2024 · 0 comments
Open

[Bug]: Async send is not allowed within a lock statement #42584

MaryamZi opened this issue Apr 18, 2024 · 0 comments
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@MaryamZi
Copy link
Member

Description

$title, but only sync sends need to be disallowed in a lock statement.

Steps to Reproduce

import ballerina/io;

public function main() {
    worker w1 {
        lock {
            1 -> w2;
        }
    }

    worker w2 {
        int value = <- w1;
        io:println(value);
    }

    wait w2;
}

Affected Version(s)

2201.5.0 and later versions

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

ballerina-platform/ballerina-spec#1170
#38670

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@MaryamZi MaryamZi added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

No branches or pull requests

1 participant