Is there a way to interrupt (Ctrl+C) a Python script based on a loop that is embedded in a Cython extension?
Ctrl+C
I have the following python script:
Release GIL when Cython runs parts that do not interface with Python, run loop in the main thread (sleep or check the simulation status), and call sim.Stop() (that can set some flag that your simulation can check periodically) in the except close.
sim.Stop()
except