Handle SIGINT #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fetcher's may take a lot of time in some cases. We should implement a SIGINT signal handler that sets some atomic bool and PlatformAPI should check for that.
I think, a good place to check for such a global bool might be every fetch call in PlatformAPI.
Just for the sake of simplicity, I don't think we need a SIGINT handler. Without one, wbij simply crashes on Ctlr-c but that's fine. The only thing that we should tidy up is the cache
.lock. But we don't need to --- wbij is designed to gracefully withstand crashes and cache is always kept in coherent state.Adding SIGINT handler would require introducing an atomic bool and a separate thread, or polling a pipe between two threads --- a lot of complexity for a problem that does not exist.
We should only revisit this issue if we introduce threads to our architecture at some point