Commits

Antoine Pitrou authored f69061935e9
ARROW-10519: [Python] Fix deadlock when importing pandas from several threads Fix a lock ordering-induced deadlock between the Python GIL and the `std::once_flag` lock used in `arrow::py::internal::InitPandasStaticData`. Thread A: * takes the GIL * calls `arrow::py::internal::InitPandasStaticData` * which calls `std::call_once`, which acquires the lock inside the `std::once_flag` * which imports the `pandas` module * which releases the GIL before reading the code object from disk * and then tries to re-acquire the GIL Thread B: * takes the GIL * calls `arrow::py::internal::InitPandasStaticData` * which calls `std::call_once`, which tries to acquire the lock inside the `std::once_flag` Closes #8615 from pitrou/ARROW-10519-pandas-import-deadlock Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>