You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This work was produced with the help of language models.
Python runs its SIGINT handler only between bytecodes. While the main thread waits in the engine for execute(), query() or query_as_arrow(), Ctrl-C has no effect until the query finishes. With SIGINT sent 1 s into a query that runs for 15-18 s, KeyboardInterrupt appeared only when the query finished, 15-18 s after it started.
importladybugaslbconn=lb.Connection(lb.Database(":memory:"))
# Runs for many seconds; press Ctrl-C while it does.conn.execute("WITH range(1, 40000) AS r UNWIND r AS x UNWIND r AS y RETURN sum(x * y)")
Expected: the query is interrupted and KeyboardInterrupt is raised promptly; the connection stays usable. Actual: the query runs to the end; KeyboardInterrupt is raised only after it has finished.
Reproduced on main (548c183) with CPython 3.12. The fix covers the pybind backend on POSIX; the C-API backend calls the engine through ctypes and is not covered.
Activity