ShadowySpirits commented on code in PR #2112:
URL:
https://github.com/apache/incubator-opendal/pull/2112#discussion_r1176295039
##########
bindings/java/src/lib.rs:
##########
@@ -15,20 +15,29 @@
// specific language governing permissions and limitations
// under the License.
+use std::cell::RefCell;
use std::collections::HashMap;
use std::str::FromStr;
+use std::sync::Arc;
-use jni::objects::JClass;
use jni::objects::JMap;
use jni::objects::JObject;
use jni::objects::JString;
+use jni::objects::{JClass, JValue};
use jni::sys::jboolean;
use jni::sys::jlong;
-use jni::JNIEnv;
+use jni::{JNIEnv, JavaVM};
+use tokio::runtime::{Builder, Runtime};
+
use opendal::BlockingOperator;
use opendal::Operator;
use opendal::Scheme;
+thread_local! {
Review Comment:
`attach_current_thread` has a heavy cost, it is not a good choice to attach
JVM in every operation.
--
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]