This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 8a01d29e9 docs(bindings/java): improve safety doc for get_current_env 
(#2733)
8a01d29e9 is described below

commit 8a01d29e97499414e2da07c2559a25a88db77908
Author: tison <[email protected]>
AuthorDate: Mon Jul 31 00:31:17 2023 +0800

    docs(bindings/java): improve safety doc for get_current_env (#2733)
    
    Signed-off-by: tison <[email protected]>
---
 bindings/java/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/java/src/lib.rs b/bindings/java/src/lib.rs
index 1a9d20634..b867e8e2a 100644
--- a/bindings/java/src/lib.rs
+++ b/bindings/java/src/lib.rs
@@ -77,7 +77,7 @@ pub unsafe extern "system" fn JNI_OnUnload(_: JavaVM, _: *mut 
c_void) {
 
 /// # Safety
 ///
-/// This function could be only when the lib is loaded.
+/// This function could be only when the lib is loaded and within a 
RUNTIME-spawned thread.
 unsafe fn get_current_env<'local>() -> JNIEnv<'local> {
     let env = ENV.with(|cell| *cell.borrow_mut()).unwrap();
     JNIEnv::from_raw(env).unwrap()

Reply via email to