-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
@spawn expressions correctly capture local variables the way closures always do, but this does not work for global variables defined at the prompt:
julia> d=drandn(4,4)
DArray((4,4),RemoteRef(1,1,2),[1,2],[1,3,5],2,1,GlobalObject())
julia> @spawn d[1]+1
RemoteRef(2,1,4)
julia> exception on 2: in anonymous: d not defined
This should be made to work somehow. Basically we need to surround the spawn with let d=d ... for each global it references.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior