Skip to content

Commit ec65ada

Browse files
committed
use Ref(STATUS_EMPTY)
1 parent 8087c60 commit ec65ada

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nonblocking.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function Wait(req::Request, status::Union{Ref{Status},Nothing}=nothing)
196196
return nothing
197197
end
198198
function Wait(req::Request, ::Type{Status})
199-
status = Ref{Status}()
199+
status = Ref(STATUS_EMPTY)
200200
Wait(req, status)
201201
return status[]
202202
end
@@ -224,7 +224,7 @@ function Test(req::Request, status::Union{Ref{Status},Nothing}=nothing)
224224
return flag[] != 0
225225
end
226226
function Test(req::Request, ::Type{Status})
227-
status = Ref{Status}()
227+
status = Ref(STATUS_EMPTY)
228228
flag = Test(req, status)
229229
return flag, status[]
230230
end
@@ -377,7 +377,7 @@ function Waitany(reqs::RequestSet, status::Union{Ref{Status}, Nothing}=nothing)
377377
return i
378378
end
379379
function Waitany(reqs::RequestSet, ::Type{Status})
380-
status = Ref{Status}()
380+
status = Ref(STATUS_EMPTY)
381381
i = Waitany(reqs, status)
382382
return i, status[]
383383
end
@@ -421,7 +421,7 @@ function Testany(reqs::RequestSet, status::Union{Ref{Status}, Nothing}=nothing)
421421
return flag, i
422422
end
423423
function Testany(reqs::RequestSet, ::Type{Status})
424-
status = Ref{Status}()
424+
status = Ref(STATUS_EMPTY)
425425
flag, i = Testany(reqs, status)
426426
return flag, i, status[]
427427
end

0 commit comments

Comments
 (0)