ray/cpp
Qing Wang a37d9a2ec2
[Core] Support default actor lifetime. (#21283)
Support the ability to specify a default lifetime for actors which are not specified lifetime when creating. This is a job level configuration item.
#### API Change
The Python API looks like:
```python
  ray.init(job_config=JobConfig(default_actor_lifetime="detached"))
```

Java API looks like:
```java
  System.setProperty("ray.job.default-actor-lifetime", defaultActorLifetime.name());
  Ray.init();
```

One example usage is:
```python
  ray.init(job_config=JobConfig(default_actor_lifetime="detached"))
  a1 = A.options(lifetime="non_detached").remote()   # a1 is a non-detached actor.
  a2 = A.remote()  # a2 is a non-detached actor.
```

Co-authored-by: Kai Yang <kfstorm@outlook.com>
Co-authored-by: Qing Wang <jovany.wq@antgroup.com>
2022-01-22 12:26:08 +08:00
..
example [C++ API] Support object ref args (#19550) 2021-10-29 17:36:53 +08:00
include/ray [C++ Worker][xlang] Support calling python worker (#21390) 2022-01-21 13:55:30 +08:00
src/ray [Core] Support default actor lifetime. (#21283) 2022-01-22 12:26:08 +08:00
BUILD.bazel [C++ Worker][xlang] Support calling python worker (#21390) 2022-01-21 13:55:30 +08:00