Skip to content

Commit 179227f

Browse files
jishnubjohanmon
authored andcommitted
Distributed: add type assertion in take!(::RemoteChannel) (JuliaLang#41403)
1 parent f9f7920 commit 179227f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/Distributed/src/remotecall.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ fetch_ref(rid, args...) = fetch(lookup_ref(rid).c, args...)
544544
Wait for and get a value from a [`RemoteChannel`](@ref). Exceptions raised are the
545545
same as for a [`Future`](@ref). Does not remove the item fetched.
546546
"""
547-
fetch(r::RemoteChannel, args...) = call_on_owner(fetch_ref, r, args...)
547+
fetch(r::RemoteChannel, args...) = call_on_owner(fetch_ref, r, args...)::eltype(r)
548548

549549
isready(rv::RemoteValue, args...) = isready(rv.c, args...)
550550

@@ -623,7 +623,7 @@ end
623623
Fetch value(s) from a [`RemoteChannel`](@ref) `rr`,
624624
removing the value(s) in the process.
625625
"""
626-
take!(rr::RemoteChannel, args...) = call_on_owner(take_ref, rr, myid(), args...)
626+
take!(rr::RemoteChannel, args...) = call_on_owner(take_ref, rr, myid(), args...)::eltype(rr)
627627

628628
# close and isopen are not supported on Future
629629

0 commit comments

Comments
 (0)