zhanglistar commented on code in PR #10815:
URL: 
https://github.com/apache/incubator-gluten/pull/10815#discussion_r2418415725


##########
cpp-ch/local-engine/jni/jni_common.h:
##########
@@ -46,6 +47,106 @@ jstring charTojstring(JNIEnv * env, const char * pat);
 
 jbyteArray stringTojbyteArray(JNIEnv * env, const std::string & str);
 
+// A watcher to monitor JNIEnv status: it's active or not
+class JniEnvStatusWatcher
+{
+public:
+    static JniEnvStatusWatcher & instance();
+    void active() { is_active.store(true, std::memory_order_release); }

Review Comment:
   Better to use `setActive` name as it does.



##########
cpp-ch/local-engine/jni/jni_common.h:
##########
@@ -46,6 +47,106 @@ jstring charTojstring(JNIEnv * env, const char * pat);
 
 jbyteArray stringTojbyteArray(JNIEnv * env, const std::string & str);
 
+// A watcher to monitor JNIEnv status: it's active or not
+class JniEnvStatusWatcher
+{
+public:
+    static JniEnvStatusWatcher & instance();
+    void active() { is_active.store(true, std::memory_order_release); }
+    void inactive() { is_active.store(false, std::memory_order_release); }

Review Comment:
   Better use `setInactive` name as it does.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to