[Java] Avoid unnecessary memory copy and addd a benchmark (#4611)

This commit is contained in:
Hao Chen
2019-04-14 00:17:04 +08:00
committed by GitHub
parent 0bfb0d2c29
commit d52b080081
6 changed files with 68 additions and 16 deletions
@@ -36,6 +36,7 @@ public final class Ray extends RayCall {
public static synchronized void init(RayRuntimeFactory factory) {
if (runtime == null) {
runtime = factory.createRayRuntime();
Runtime.getRuntime().addShutdownHook(new Thread(Ray::shutdown));
}
}