Skip to content

Commit 72f3077

Browse files
authored
Merge pull request #25615 from JuliaLang/jb/underscoredeps
remove some underscores
2 parents 2707030 + f90df68 commit 72f3077

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/clusterserialize.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mutable struct ClusterSerializer{I<:IO} <: AbstractSerializer
1414

1515
pid::Int # Worker we are connected to.
1616
tn_obj_sent::Set{UInt64} # TypeName objects sent
17-
glbs_sent::Dict{UInt64, UInt64} # (key,value) -> (object_id, hash_value)
17+
glbs_sent::Dict{UInt64, UInt64} # (key,value) -> (objectid, hash_value)
1818
glbs_in_tnobj::Dict{UInt64, Vector{Symbol}} # Track globals referenced in
1919
# anonymous functions.
2020
anonfunc_id::UInt64
@@ -116,7 +116,7 @@ function serialize(s::ClusterSerializer, g::GlobalRef)
116116
end
117117

118118
# Send/resend a global object if
119-
# a) has not been sent previously, i.e., we are seeing this object_id for the first time, or,
119+
# a) has not been sent previously, i.e., we are seeing this objectid for the first time, or,
120120
# b) hash value has changed or
121121
# c) is a bits type
122122
function syms_2b_sent(s::ClusterSerializer, identifier)
@@ -128,7 +128,7 @@ function syms_2b_sent(s::ClusterSerializer, identifier)
128128
if isbits(v)
129129
push!(lst, sym)
130130
else
131-
oid = object_id(v)
131+
oid = objectid(v)
132132
if haskey(s.glbs_sent, oid)
133133
# We have sent this object before, see if it has changed.
134134
s.glbs_sent[oid] != hash(sym, hash(v)) && push!(lst, sym)
@@ -143,7 +143,7 @@ end
143143
function serialize_global_from_main(s::ClusterSerializer, sym)
144144
v = getfield(Main, sym)
145145

146-
oid = object_id(v)
146+
oid = objectid(v)
147147
record_v = true
148148
if isbits(v)
149149
record_v = false
@@ -179,7 +179,7 @@ function deserialize_global_from_main(s::ClusterSerializer, sym)
179179
end
180180

181181
function delete_global_tracker(s::ClusterSerializer, v)
182-
oid = object_id(v)
182+
oid = objectid(v)
183183
if haskey(s.glbs_sent, oid)
184184
delete!(s.glbs_sent, oid)
185185
end

test/distributed_exec.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -1161,8 +1161,8 @@ v6 = FooModEverywhere
11611161
Base.Serializer.serialize_type(s, TestSerCnt)
11621162
serialize(s, t.v)
11631163
global testsercnt_d
1164-
cnt = get!(testsercnt_d, object_id(t), 0)
1165-
testsercnt_d[object_id(t)] = cnt+1
1164+
cnt = get!(testsercnt_d, objectid(t), 0)
1165+
testsercnt_d[objectid(t)] = cnt+1
11661166
end
11671167

11681168
Base.deserialize(s::AbstractSerializer, ::Type{TestSerCnt}) = TestSerCnt(deserialize(s))
@@ -1174,22 +1174,22 @@ for i in 1:5
11741174
remotecall_fetch(()->tsc, id_other)
11751175
end
11761176
# should have been serialized only once
1177-
@test testsercnt_d[object_id(tsc)] == 1
1177+
@test testsercnt_d[objectid(tsc)] == 1
11781178

11791179
# hash values are changed
11801180
n=5
1181-
testsercnt_d[object_id(tsc)] = 0
1181+
testsercnt_d[objectid(tsc)] = 0
11821182
for i in 1:n
11831183
tsc.v[i] = i
11841184
remotecall_fetch(()->tsc, id_other)
11851185
end
11861186
# should have been serialized as many times as the loop
1187-
@test testsercnt_d[object_id(tsc)] == n
1187+
@test testsercnt_d[objectid(tsc)] == n
11881188

11891189
# Multiple references in a closure should be serialized only once.
11901190
global mrefs = TestSerCnt(fill(1.,10))
11911191
@test remotecall_fetch(()->(mrefs.v, 2*mrefs.v, 3*mrefs.v), id_other) == (fill(1.,10), fill(2.,10), fill(3.,10))
1192-
@test testsercnt_d[object_id(mrefs)] == 1
1192+
@test testsercnt_d[objectid(mrefs)] == 1
11931193

11941194

11951195
# nested anon functions
@@ -1239,9 +1239,9 @@ global ids_func = ()->ids_cleanup
12391239
clust_ser = (Distributed.worker_from_id(id_other)).w_serializer
12401240
@test remotecall_fetch(ids_func, id_other) == ids_cleanup
12411241

1242-
@test haskey(clust_ser.glbs_sent, object_id(ids_cleanup))
1242+
@test haskey(clust_ser.glbs_sent, objectid(ids_cleanup))
12431243
finalize(ids_cleanup)
1244-
@test !haskey(clust_ser.glbs_sent, object_id(ids_cleanup))
1244+
@test !haskey(clust_ser.glbs_sent, objectid(ids_cleanup))
12451245

12461246
# TODO Add test for cleanup from `clust_ser.glbs_in_tnobj`
12471247

0 commit comments

Comments
 (0)