ShadowySpirits commented on code in PR #2112:
URL: 
https://github.com/apache/incubator-opendal/pull/2112#discussion_r1176290222


##########
bindings/java/src/lib.rs:
##########
@@ -45,7 +54,29 @@ pub extern "system" fn 
Java_org_apache_opendal_Operator_getOperator(
 
     let map = convert_map(&mut env, &params);
     if let Ok(operator) = build_operator(scheme, map) {
-        Box::into_raw(Box::new(operator)) as jlong
+        let java_vm = Arc::new(env.get_java_vm().unwrap());
+        let runtime = Builder::new_multi_thread()

Review Comment:
   We could use [once_cell](https://crates.io/crates/once_cell) to create 
runtime only one time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to