mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Init_table_callback now takes ownership of passed in data (#80)
* temp commit * Stuff * Ownership is now taken by init table callback * Fixed lint errors * Fixed travis warnings * Fixed spacing * add .gitkeep * fix global scheduler * Whitespace.
This commit is contained in:
committed by
Robert Nishihara
parent
61755bc168
commit
9a513363f9
@@ -305,6 +305,14 @@ task *alloc_task(task_spec *spec, scheduling_state state, node_id node) {
|
||||
return result;
|
||||
}
|
||||
|
||||
task *copy_task(task *other) {
|
||||
int64_t size = task_size(other);
|
||||
task *copy = malloc(size);
|
||||
CHECK(copy != NULL);
|
||||
memcpy(copy, other, size);
|
||||
return copy;
|
||||
}
|
||||
|
||||
task *alloc_nil_task(task_id task_id) {
|
||||
task_spec *nil_spec = alloc_nil_task_spec(task_id);
|
||||
task *nil_task = alloc_task(nil_spec, 0, NIL_ID);
|
||||
|
||||
Reference in New Issue
Block a user