Enhancement: signal to end processing early e.g. via AbortController API
I couldn't find anything in the docs or in the repo except for the timeout option. However, I'd like to kill the process while it's still happening (for example, if the user requests the process to be stopped, I would like to free up the memory).
I've noticed that there's _vips_shutdown() being used internally and I wonder if this function does the above?
Given the multi-threaded nature of image processing we can't stop things immediately but it might be possible to set a flag that says "stop when all running threads have joined" and periodically check that. I'm unsure how we'd get this info across the JavaScript/C++ divide most efficiently so this would require some experimentation.
In terms of API, something like an AbortController would make sense.
This partly relates to #2189 - it might be possible to implement both via the same means.
Ah, thank you. I am currently planning to kill the entire container when the job is complete to be safe.