mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 03:25:27 +08:00
[Java] Fix some potential bugs about Ray.shutdown() (#5693)
This commit is contained in:
@@ -33,6 +33,10 @@ public class RayDevRuntime extends AbstractRayRuntime {
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
if (taskSubmitter != null) {
|
||||
((LocalModeTaskSubmitter) taskSubmitter).shutdown();
|
||||
taskSubmitter = null;
|
||||
}
|
||||
taskExecutor = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
|
||||
}
|
||||
if (null != manager) {
|
||||
manager.cleanup();
|
||||
manager = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -210,6 +210,10 @@ public class LocalModeTaskSubmitter implements TaskSubmitter {
|
||||
}
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
exec.shutdown();
|
||||
}
|
||||
|
||||
public static ActorId getActorId(TaskSpec taskSpec) {
|
||||
ByteString actorId = null;
|
||||
if (taskSpec.getType() == TaskType.ACTOR_CREATION_TASK) {
|
||||
|
||||
Reference in New Issue
Block a user