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

scoping issue in @sync #5930

Closed
amitmurthy opened this issue Feb 24, 2014 · 2 comments
Closed

scoping issue in @sync #5930

amitmurthy opened this issue Feb 24, 2014 · 2 comments
Labels
domain:parallelism Parallel or distributed computation needs tests Unit tests are required for this change

Comments

@amitmurthy
Copy link
Contributor

The below scoping behavior seems a little confusing:

addprocs(1)

function foo()
    a = 3
    @sync begin 
        @spawn println(a)
    end
end

foo()

works as expected, but

@sync begin
    b = 2
    @spawn println(b)
end

fails with a exception on 2: ERROR: b not defined .

Was triggered by https://groups.google.com/d/msg/julia-users/RsX64KwJUBU/iZAwcNB_c5kJ

Maybe related: #3713

@amitmurthy
Copy link
Contributor Author

Closed by #19594

@tkelman
Copy link
Contributor

tkelman commented Jan 26, 2017

tested?

@tkelman tkelman added the needs tests Unit tests are required for this change label Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:parallelism Parallel or distributed computation needs tests Unit tests are required for this change
Projects
None yet
Development

No branches or pull requests

3 participants