Skip to content

Handle SIGINT in the python catalog SDK #11746

@abey79

Description

@abey79

The python interpreter handles SIGINT regularly between instruction. However, it doesn't do it durring FFI calls. So when we wait_for_future for a long time (e.g because the server is slow or stalling), ctrl-C doesn't interrupt the waiting.

It would appear that the solution to that is to use [PyErr_CheckSignals](https://docs.python.org/3/c-api/exceptions.html#c.PyErr_CheckSignals). We could poll it in parallel to f in the implementation of wait_for_future, and early out with an Interrupted error. Maybe?

Background:

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataplatformRerun Data Platform integrationsdk-pythonPython logging API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions