odd-jobs
odd-jobs copied to clipboard
Implement all callbacks
Fixes #63
Would love to see this go in, since I would like to start using cfgOnJobTimeout
. Is there anything I can do to help?
The changes required to get onJobTimeout
working are a bit cryptic. I've got a changeset that works for testing locally, but why exactly it works, and why the changes are necessary, is unclear. I think the combination of masking and uninterruptable actions in runJobWithTimeout
can lead to threads being blocked in unintuitive ways, which also lines up with my experience that TimeoutException
s are never thrown by even long-running jobs.
Alright, I appear to have fixed the issue. I still don't know exactly if masking matters or not, but changing the timeout code to not call uninterruptibleCancel
allows the timeout exception to be propagated properly, which causes the callback to be called at the appropriate time.