We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This code will result an error LoadError: UndefVarError: a#259 not defined.
LoadError: UndefVarError: a#259 not defined
using Polyester function test() a = zeros(3) @batch for i in 1:3 if false a = zeros(3) end a[i] = 1.0 end end test()
But it will be OK when I use Threads.@threads. Is it a bug?
Thank you very much.
The text was updated successfully, but these errors were encountered:
Polyester tries very hard not to capture variables in closures. The a = inside the loop tells it not to take any as from the surrounding scope.
a =
a
Sorry, something went wrong.
I'm having a similar issue. Why does Polyester operate this way?
As a workaround for JuliaLang/julia#15276
No branches or pull requests
This code will result an error
LoadError: UndefVarError: a#259 not defined
.But it will be OK when I use Threads.@threads. Is it a bug?
Thank you very much.
The text was updated successfully, but these errors were encountered: