-
Notifications
You must be signed in to change notification settings - Fork 39
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
use of rehash! in constructor #9
Comments
Something weird related to @everywhere begin
using OrderedCollections
struct Foo
x::Vector{Int}
end
function foo(i)
x = Foo(Int[])
return x, OrderedDict(x => 2)
end
end
function bar()
x, y = pmap(foo, 1:1)[1]
z = copy(y)
OrderedCollections.rehash!(z)
return haskey(y, x), haskey(z, x)
end
a, b = bar() # false, true ?!? |
@odow In general, it would be good to open another issue for things like this (and bump it if it's important and not being responded to), or ask a question on Discourse. In this case, the issue is that you haven't defined a hash function for It also won't generally work (locally or remotely) if you define a hash function that depends on |
@kmsquire I don't remember opening this, or what it was related to, so I guess I figured out the reason. Thanks for the explanation. |
I noticed the following snippet in ordered_dict.jl:
Isn't this a known source of bugs? See JuliaCollections/DataStructures.jl#335
The text was updated successfully, but these errors were encountered: