TomTJarosz commented on code in PR #39314:
URL: https://github.com/apache/arrow/pull/39314#discussion_r1445068403


##########
python/pyarrow/pandas-shim.pxi:
##########
@@ -101,8 +101,10 @@ cdef class _PandasAPIShim(object):
                 self._import_pandas(raise_)
             return
 
-        self._tried_importing_pandas = True
-        self._import_pandas(raise_)
+        try:
+            self._import_pandas(raise_)
+        finally:
+            self._tried_importing_pandas = True

Review Comment:
   > In most cases, this method will return from line 102 above, right?
   
   Ah yes good point, a lock should not hurt performance in those cases. I can 
go ahead with that approach



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