Persist everything to disk in real time. When the signal hits exit immediately.
Persist everything to disk in real time.
That’s the thing I’m trying to avoid.
Easier to do than to get never-exercised edge-case code to work flawlessly. Are you sure you can’t just throw sqlite at the problem? It’s often overkill but, hey, it’s there on the shelf, might as well use it and I’ve seen it out-perform hand-rolled data structures. Non-persistent ones, written by very confident C coders. And remember crashes are unavoidable, if nothing else then someone can trip over the power cord.
You can’t know that from my issue description, but throwing a database at that problem really is ridiculous overkill.
Still thanks for the suggestion