mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
Basic direct actor call support in Python (#5991)
This commit is contained in:
@@ -171,6 +171,7 @@ cdef extern from "ray/common/buffer.h" namespace "ray" nogil:
|
||||
|
||||
cdef cppclass LocalMemoryBuffer(CBuffer):
|
||||
LocalMemoryBuffer(uint8_t *data, size_t size, c_bool copy_data)
|
||||
LocalMemoryBuffer(size_t size)
|
||||
|
||||
cdef extern from "ray/common/ray_object.h" nogil:
|
||||
cdef cppclass CRayObject "ray::RayObject":
|
||||
|
||||
@@ -62,6 +62,7 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
|
||||
const c_vector[shared_ptr[CRayObject]] &args,
|
||||
const c_vector[CObjectID] &arg_reference_ids,
|
||||
const c_vector[CObjectID] &return_ids,
|
||||
c_bool is_direct_call,
|
||||
c_vector[shared_ptr[CRayObject]] *returns) nogil,
|
||||
CRayStatus() nogil)
|
||||
void Disconnect()
|
||||
|
||||
@@ -148,6 +148,8 @@ cdef extern from "ray/common/id.h" namespace "ray" nogil:
|
||||
|
||||
c_bool is_put()
|
||||
|
||||
c_bool IsDirectActorType()
|
||||
|
||||
int64_t ObjectIndex() const
|
||||
|
||||
CTaskID TaskId() const
|
||||
|
||||
@@ -176,6 +176,9 @@ cdef class ObjectID(BaseID):
|
||||
def hex(self):
|
||||
return decode(self.data.Hex())
|
||||
|
||||
def is_direct_actor_type(self):
|
||||
return self.data.IsDirectActorType()
|
||||
|
||||
def is_nil(self):
|
||||
return self.data.IsNil()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user