mirror of
https://github.com/wassname/ray.git
synced 2026-07-05 08:31:18 +08:00
[cpp worker] support Ray::Get() static method (#9809)
This commit is contained in:
@@ -39,6 +39,14 @@ class Ray {
|
||||
template <typename T>
|
||||
static ObjectRef<T> Put(const T &obj);
|
||||
|
||||
/// Get a single object from the object store.
|
||||
/// This method will be blocked until the object is ready.
|
||||
///
|
||||
/// \param[in] object The object reference which should be returned.
|
||||
/// \return shared pointer of the result.
|
||||
template <typename T>
|
||||
static std::shared_ptr<T> Get(const ObjectRef<T> &object);
|
||||
|
||||
/// Get a list of objects from the object store.
|
||||
/// This method will be blocked until all the objects are ready.
|
||||
///
|
||||
@@ -77,10 +85,6 @@ class Ray {
|
||||
|
||||
static std::once_flag is_inited_;
|
||||
|
||||
/// Used by ObjectRef to implement .Get()
|
||||
template <typename T>
|
||||
static std::shared_ptr<T> Get(const ObjectRef<T> &object);
|
||||
|
||||
template <typename ReturnType, typename FuncType, typename ExecFuncType,
|
||||
typename... ArgTypes>
|
||||
static TaskCaller<ReturnType> TaskInternal(FuncType &func, ExecFuncType &exec_func,
|
||||
|
||||
Reference in New Issue
Block a user