mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 21:38:18 +08:00
[Java] add exitActor API for java (#10496)
This commit is contained in:
@@ -241,4 +241,16 @@ public final class Ray extends RayCall {
|
||||
PlacementStrategy strategy) {
|
||||
return runtime.createPlacementGroup(bundles, strategy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Intentionally exit the current actor.
|
||||
* <p>
|
||||
* This method is used to disconnect an actor and exit the worker.
|
||||
*
|
||||
* @throws RuntimeException An exception is raised if this is a driver or this worker is not
|
||||
* an actor.
|
||||
*/
|
||||
public static void exitActor() {
|
||||
runtime.exitActor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,4 +193,9 @@ public interface RayRuntime {
|
||||
* @return The wrapped callable.
|
||||
*/
|
||||
<T> Callable<T> wrapCallable(Callable<T> callable);
|
||||
|
||||
/**
|
||||
* Intentionally exit the current actor.
|
||||
*/
|
||||
void exitActor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user