odd-jobs icon indicating copy to clipboard operation
odd-jobs copied to clipboard

Implement all callbacks

Open saurabhnanda opened this issue 3 years ago • 1 comments

Fixes #63

saurabhnanda avatar Jun 26 '21 14:06 saurabhnanda

Would love to see this go in, since I would like to start using cfgOnJobTimeout. Is there anything I can do to help?

ivanbakel avatar Jul 28 '21 17:07 ivanbakel

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 TimeoutExceptions are never thrown by even long-running jobs.

ivb-supercede avatar Jan 31 '23 12:01 ivb-supercede

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.

ivb-supercede avatar Jan 31 '23 17:01 ivb-supercede