mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
Implement async get for direct actor call (#6339)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user