mirror of
https://github.com/wassname/ray.git
synced 2026-08-17 11:25:34 +08:00
Refactor local scheduler to remove worker indices. (#245)
* Refactor local scheduler to remove worker indices. * Change scheduling state enum to int in all function signatures. * Bug fix, don't use pointers into a resizable array. * Remove total_num_workers. * Fix tests.
This commit is contained in:
committed by
Philipp Moritz
parent
ca254b8689
commit
2d1c980ad7
+3
-5
@@ -291,9 +291,7 @@ typedef struct task_impl task;
|
||||
* @param local_scheduler_id The ID of the local scheduler that the task is
|
||||
* scheduled on, if any.
|
||||
*/
|
||||
task *alloc_task(task_spec *spec,
|
||||
scheduling_state state,
|
||||
db_client_id local_scheduler_id);
|
||||
task *alloc_task(task_spec *spec, int state, db_client_id local_scheduler_id);
|
||||
|
||||
/**
|
||||
* Create a copy of the task. Must be freed with free_task after use.
|
||||
@@ -307,10 +305,10 @@ task *copy_task(task *other);
|
||||
int64_t task_size(task *task);
|
||||
|
||||
/** The scheduling state of the task. */
|
||||
scheduling_state task_state(task *task);
|
||||
int task_state(task *task);
|
||||
|
||||
/** Update the schedule state of the task. */
|
||||
void task_set_state(task *task, scheduling_state state);
|
||||
void task_set_state(task *task, int state);
|
||||
|
||||
/** Local scheduler this task has been assigned to or is running on. */
|
||||
db_client_id task_local_scheduler(task *task);
|
||||
|
||||
Reference in New Issue
Block a user