mirror of
https://github.com/wassname/ray.git
synced 2026-09-10 12:38:43 +08:00
Mark worker as blocked and trigger reconstruction in ray.wait. (#2864)
* Trigger reconstruction in ray.wait and mark worker as blocked. * Add test. * Linting. * Don't run new test with legacy Ray. * Only call HandleClientUnblocked if it actually blocked in ray.wait. * Reduce time to ray.wait in the test.
This commit is contained in:
committed by
Philipp Moritz
parent
a1b8e79c30
commit
f16d33593b
+9
-1
@@ -2063,7 +2063,15 @@ class WorkerPoolTests(unittest.TestCase):
|
||||
object_ids = [f.remote(i, j) for j in range(2)]
|
||||
return ray.get(object_ids)
|
||||
|
||||
ray.get([g.remote(i) for i in range(4)])
|
||||
@ray.remote
|
||||
def h(i):
|
||||
# Each instance of g submits and blocks on the result of another
|
||||
# remote task using ray.wait.
|
||||
object_ids = [f.remote(i, j) for j in range(2)]
|
||||
return ray.wait(object_ids, num_returns=len(object_ids))
|
||||
|
||||
if os.environ.get("RAY_USE_XRAY") == "1":
|
||||
ray.get([h.remote(i) for i in range(4)])
|
||||
|
||||
@ray.remote
|
||||
def _sleep(i):
|
||||
|
||||
Reference in New Issue
Block a user