mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Workaround for passing empty list to ray.wait. (#1043)
* Workaround for passing empty list to ray.wait. * Add test for passing empty list to wait.
This commit is contained in:
committed by
Philipp Moritz
parent
79e013e876
commit
ad61af7333
@@ -704,6 +704,11 @@ class APITest(unittest.TestCase):
|
||||
x = ray.put(1)
|
||||
self.assertRaises(Exception, lambda: ray.wait([x, x]))
|
||||
|
||||
# Make sure it is possible to call wait with an empty list.
|
||||
ready_ids, remaining_ids = ray.wait([])
|
||||
self.assertEqual(ready_ids, [])
|
||||
self.assertEqual(remaining_ids, [])
|
||||
|
||||
def testMultipleWaitsAndGets(self):
|
||||
# It is important to use three workers here, so that the three tasks
|
||||
# launched in this experiment can run at the same time.
|
||||
|
||||
Reference in New Issue
Block a user