From 46cd67f6c41b7cd598ff96124de269fa14bf8392 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Fri, 2 Jul 2021 19:11:38 +0400 Subject: [PATCH] Distributed: add type assertion in take!(::RemoteChannel) (#41403) --- stdlib/Distributed/src/remotecall.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/Distributed/src/remotecall.jl b/stdlib/Distributed/src/remotecall.jl index 91e5de36736bd..6be7be2c8a91b 100644 --- a/stdlib/Distributed/src/remotecall.jl +++ b/stdlib/Distributed/src/remotecall.jl @@ -544,7 +544,7 @@ fetch_ref(rid, args...) = fetch(lookup_ref(rid).c, args...) Wait for and get a value from a [`RemoteChannel`](@ref). Exceptions raised are the same as for a [`Future`](@ref). Does not remove the item fetched. """ -fetch(r::RemoteChannel, args...) = call_on_owner(fetch_ref, r, args...) +fetch(r::RemoteChannel, args...) = call_on_owner(fetch_ref, r, args...)::eltype(r) isready(rv::RemoteValue, args...) = isready(rv.c, args...) @@ -623,7 +623,7 @@ end Fetch value(s) from a [`RemoteChannel`](@ref) `rr`, removing the value(s) in the process. """ -take!(rr::RemoteChannel, args...) = call_on_owner(take_ref, rr, myid(), args...) +take!(rr::RemoteChannel, args...) = call_on_owner(take_ref, rr, myid(), args...)::eltype(rr) # close and isopen are not supported on Future