liuyu81 commented on issue #11932: URL: https://github.com/apache/arrow/issues/11932#issuecomment-993193569
Out of curiosity, I took a closer look at the implementation of pyarrow's flight server, and it seems like [`FlightStreamReader.read_all`](https://github.com/apache/arrow/blob/cf8d81d9fcbc43ce57b8a0d36c05f8b4273a5fa3/python/pyarrow/_flight.pyx#L904) is protected by [SignalStopHandler](https://github.com/apache/arrow/blob/cf8d81d9fcbc43ce57b8a0d36c05f8b4273a5fa3/python/pyarrow/error.pxi#L181) which calls into [the C++ code](https://github.com/apache/arrow/blob/2464b149b3d06c6c3e45136dad0f3956772ca487/cpp/src/arrow/util/cancel.h) and blocks custom signal handlers. But still, on the Python side, the signal-blocking behavior is controlled by the [`signal_handlers_enabled`](https://github.com/apache/arrow/blob/cf8d81d9fcbc43ce57b8a0d36c05f8b4273a5fa3/python/pyarrow/error.pxi#L151) global variable, and it can be toggled on / off with [`enable_signal_handlers()`](https://github.com/apache/arrow/blob/cf8d81d9fcbc43ce57b8a0d36c05f8b4273a5fa3/python/pyarrow/error.pxi#L154). Could anyone she d some light on why calling `enable_signal_handlers(False)` from the main thread doesn't prevent the signal-blocking behavior? -- 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]
