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

Not working with continue keyword #25

Closed
sairus7 opened this issue Jun 17, 2021 · 2 comments
Closed

Not working with continue keyword #25

sairus7 opened this issue Jun 17, 2021 · 2 comments

Comments

@sairus7
Copy link

sairus7 commented Jun 17, 2021

@qbthreads for x in 1:3
    if x == 2
        continue
    end
    println("$x $(Threads.threadid())")
end

Output:

ERROR: LoadError: syntax: break or continue outside loop
@tro3
Copy link
Owner

tro3 commented Jun 17, 2021

Happens because the contents of the loop are split out among the threads. But I think I can fix it by wrapping each thread in a for _tmpvar in [1]. Will take a look

@tro3 tro3 closed this as completed in c2c99a2 Jun 19, 2021
@tro3
Copy link
Owner

tro3 commented Jun 19, 2021

Now works in version 2.0.1. Will send to Registrar

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

No branches or pull requests

2 participants