Prohibit returning actor handles and also update actor documentation. (#1246)

* Prohibit returning actor handles and also update actor documentation.

* Clarify documentation.
This commit is contained in:
Robert Nishihara
2017-11-23 09:37:24 -08:00
committed by Philipp Moritz
parent 2ae5a8484f
commit 477a40f76d
3 changed files with 98 additions and 0 deletions
+5
View File
@@ -347,6 +347,11 @@ class Worker(object):
"do this, you can wrap the ObjectID in a list and "
"call 'put' on it (or return it).")
if isinstance(value, ray.actor.ActorHandleParent):
raise Exception("Calling 'put' on an actor handle is currently "
"not allowed (similarly, returning an actor "
"handle from a remote function is not allowed).")
# Serialize and put the object in the object store.
try:
self.store_and_register(object_id, value)