Feature request: resumable jobs
bbuchalter opened this issue · 3 comments
As a user,
I'd like to be able to stop a cracking job and restart it later,
So I can not lose progress.
Hey @bbuchalter, thank you for the feature suggestion. This is a much-needed feature, will implement this in the next release! 🙌
This can probably be done by expanding the current Producer interface to have "serialize" and "deserialize" functions (But I think it would be better to add a 2nd trait to avoid bloating). Then catching upon ctrl_c/other signals we serialize the producer to disk. Finally just add a paremeter/separate mode to resume operations or something.
I imagine the abort logic itself can be implemented using tools from Tokio.
Select! macro, signal handling, channels, a small wrapper and a CancellationToken should be enough for this.
Then the issue would be to port pdfrip to be async however