Skip to content

Commit

Permalink
Merge pull request #82 from JuliaData/jps/no-deepcopy-inval
Browse files Browse the repository at this point in the history
Remove deepcopy invalidations
  • Loading branch information
jpsamaroo authored Apr 2, 2024
2 parents 40100f3 + fbd168f commit ac520da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/datastore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ end
warn_dref_serdes() = @warn "Performing serialization of DRef with unknown serializer\nThis may fail or produce incorrect results" maxlog=1

# Ensure we call the DRef ctor
Base.copy(d::DRef) = deepcopy(d)
Base.deepcopy(d::DRef) = DRef(d.owner, d.id, d.size)
Base.copy(d::DRef) = DRef(d.owner, d.id, d.size)
function Base.deepcopy_internal(d::DRef, stackdict::IdDict)
if haskey(stackdict, d)
return stackdict[d]
end
return DRef(d.owner, d.id, d.size)
end

include("storage.jl")

Expand Down

0 comments on commit ac520da

Please sign in to comment.