HyukjinKwon commented on code in PR #46993:
URL: https://github.com/apache/spark/pull/46993#discussion_r1642346526


##########
python/pyspark/sql/connect/client/reattach.py:
##########
@@ -206,8 +216,8 @@ def target() -> None:
             except Exception as e:
                 warnings.warn(f"ReleaseExecute failed with exception: {e}.")
 
-        if ExecutePlanResponseReattachableIterator._release_thread_pool is not 
None:
-            
ExecutePlanResponseReattachableIterator._release_thread_pool.apply_async(target)
+        if not self._is_shutdown:
+            self._release_thread_pool.apply_async(target)

Review Comment:
   Yeah It actually accesses to the class variable, and it is not either 
discouraged or encouraged in PEP 8 if I am correctly remembering this. I just 
used `self` to make it look consistent, e.g., at `shutdown` but I don't mind 
changing it back to explicit `ExecutePlanResponseReattachableIterator`.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to