mirror of
https://github.com/wassname/ray.git
synced 2026-08-16 11:27:09 +08:00
Refactor actor task queues (#1118)
* Refactor add_task_to_actor_queue into queue_actor_task and insert_actor_task_queue * Refactor actor task queue to share the waiting task queue * Fix
This commit is contained in:
committed by
Robert Nishihara
parent
79ea205b3e
commit
15486a14a0
@@ -126,6 +126,14 @@ FunctionID TaskSpec_function(TaskSpec *spec);
|
||||
*/
|
||||
UniqueID TaskSpec_actor_id(TaskSpec *spec);
|
||||
|
||||
/**
|
||||
* Return whether this task is for an actor.
|
||||
*
|
||||
* @param spec The task_spec in question.
|
||||
* @return Whether the task is for an actor.
|
||||
*/
|
||||
bool TaskSpec_is_actor_task(TaskSpec *spec);
|
||||
|
||||
/**
|
||||
* Return the actor counter of the task. This starts at 0 and increments by 1
|
||||
* every time a new task is submitted to run on the actor.
|
||||
@@ -135,8 +143,24 @@ UniqueID TaskSpec_actor_id(TaskSpec *spec);
|
||||
*/
|
||||
int64_t TaskSpec_actor_counter(TaskSpec *spec);
|
||||
|
||||
/**
|
||||
* Return whether the task is a checkpoint method execution.
|
||||
*
|
||||
* @param spec The task_spec in question.
|
||||
* @return Whether the task is a checkpoint method.
|
||||
*/
|
||||
bool TaskSpec_actor_is_checkpoint_method(TaskSpec *spec);
|
||||
|
||||
/**
|
||||
* Return whether the task's argument is a dummy object. Dummy objects are used
|
||||
* to encode an actor's state dependencies in the task graph.
|
||||
*
|
||||
* @param spec The task_spec in question.
|
||||
* @param arg_index The index of the argument in question.
|
||||
* @return Whether the argument at arg_index is a dummy object.
|
||||
*/
|
||||
bool TaskSpec_arg_is_actor_dummy_object(TaskSpec *spec, int64_t arg_index);
|
||||
|
||||
/**
|
||||
* Return the driver ID of the task.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user