Fix stack overflow if many objects are fetched. (#237)

* fix stack overflow if many objects are fetched

* fix other stack allocations

* add tests and fix linting

* address stephanie's comments

* fix linting

* fix tests
This commit is contained in:
Philipp Moritz
2017-02-04 16:49:36 -08:00
committed by Robert Nishihara
parent e5a9fc0032
commit ca254b8689
5 changed files with 34 additions and 7 deletions
+12
View File
@@ -81,6 +81,18 @@ class TaskTests(unittest.TestCase):
self.assertTrue(ray.services.all_processes_alive())
ray.worker.cleanup()
def testGettingManyObjects(self):
ray.init()
@ray.remote
def f():
return 1
n = 10 ** 4 # TODO(pcm): replace by 10 ** 5 once this is faster
l = ray.get([f.remote() for _ in range(n)])
self.assertEqual(l, n * [1])
ray.worker.cleanup()
def testWait(self):
for num_local_schedulers in [1, 4]:
for num_workers_per_scheduler in [4]: