lidavidm commented on issue #11932: URL: https://github.com/apache/arrow/issues/11932#issuecomment-992624552
@lupko there are a few things interacting to produce that result. Note this from the documentation: > Python signal handlers are always executed in the main Python thread of the main interpreter, even if the signal was received in another thread. and > A Python signal handler does not get executed inside the low-level (C) signal handler. Instead, the low-level signal handler sets a flag which tells the virtual machine to execute the corresponding Python signal handler at a later point(for example at the next bytecode instruction). So even if PyArrow doesn't set any handlers, your handler cannot get run, because gRPC is in C++ and is not calling back into Python from the main thread. Hence you will always need a background thread. Also, @lupko and @liuyu81 what is the main goal here? Just cancelling ongoing RPCs on interrupt so the server shuts down immediately? -- 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]
