Functions for flushing done tasks and evicted objects. (#2033)

This commit is contained in:
Robert Nishihara
2018-05-18 01:59:58 -07:00
committed by Philipp Moritz
parent 15b72f9893
commit 78e4b021ab
3 changed files with 124 additions and 10 deletions
+10
View File
@@ -2218,6 +2218,16 @@ class GlobalStateAPI(unittest.TestCase):
assert len(ray.global_state.object_table()) == 0
assert len(ray.global_state.task_table()) == 0
# Run some more tasks.
ray.get([f.remote() for _ in range(10)])
while len(ray.global_state.task_table()) != 0:
ray.experimental.flush_finished_tasks_unsafe()
# Make sure that we can call this method (but it won't do anything in
# this test case).
ray.experimental.flush_evicted_objects_unsafe()
if __name__ == "__main__":
unittest.main(verbosity=2)