Skip to content

Commit

Permalink
Add support for RemoteChannel/RemoteRef
Browse files Browse the repository at this point in the history
See also #15953 for further discussion
  • Loading branch information
timholy committed Apr 20, 2016
1 parent e71e7f2 commit 7591531
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ function _compat(ex::Symbol)
if VERSION < v"0.4.0-dev+768" && ex === :Void
return :Nothing
end
if VERSION < v"0.5.0-dev+1343" && (ex == :Future || ex == :RemoteChannel)
return :RemoteRef
end
return ex
end
_compat(ex) = ex
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -994,3 +994,9 @@ cd(dirwalk) do

end
rm(dirwalk, recursive=true)

# RemoteChannel/Future
r = remotecall(sin, 1, pi/3)
@compat foo(r::Future) = 7
@test foo(r) == 7
@compat rc = RemoteChannel{Channel{Any}}(1,2,3)

0 comments on commit 7591531

Please sign in to comment.