Implement async get for direct actor call (#6339)

This commit is contained in:
Simon Mo
2019-12-18 11:50:21 -08:00
committed by GitHub
parent ec4f8d5311
commit 26ec500ef9
13 changed files with 263 additions and 8 deletions
+9
View File
@@ -196,6 +196,15 @@ cdef class ObjectID(BaseID):
def from_random(cls):
return cls(CObjectID.FromRandom().Binary())
def __await__(self):
# Delayed import because this can only be imported in py3.
from ray.async_compat import get_async
return get_async(self).__await__()
def as_future(self):
# Delayed import because this can only be imported in py3.
from ray.async_compat import get_async
return get_async(self)
cdef class TaskID(BaseID):
cdef CTaskID data