[xray] Basic actor support (#1835)

This commit is contained in:
Stephanie Wang
2018-04-06 00:17:14 -07:00
committed by Robert Nishihara
parent 313b864e66
commit bf194db4bc
27 changed files with 652 additions and 181 deletions
+15
View File
@@ -47,3 +47,18 @@ def test_basic_task_api(ray_start):
# Test arguments passed by ID.
# Test keyword arguments.
def test_actor_api(ray_start):
@ray.remote
class Foo(object):
def __init__(self, val):
self.x = val
def get(self):
return self.x
x = 1
f = Foo.remote(x)
assert (ray.get(f.get.remote()) == x)