Skip to content

Conversation

@al45tair
Copy link
Contributor

This was split out from the custom main and global executors proposal.

This was split out from the custom main and global executors
proposal.
/// - after: A `Duration` specifying the time after which the job
/// is to run. The job will not be executed before this
/// time has elapsed.
/// - tolerance: The maximum additional delay permissible before the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the "impermissible" happens and the time has exceeded the tolerance given? Is the job then never run, or is it run as soon as possible? Is there some sort of error raised?

Copy link
Contributor Author

@al45tair al45tair Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behaviour I'd expect from an executor implementation is that it will try to run jobs before the deadline (e.g. a simple strategy might be to run the jobs in deadline order), but never before after, that job scheduling will be best effort and that all jobs will execute. So maybe "permissible" is the wrong word.

I can imagine that there might be a use-case for a hard deadline, for instance if you have a real-time scheduler, but I think we would want to add more enqueue methods to support that kind of behaviour (for example, I think you'd want an estimate of the time the job could run for, and you'd want the enqueue method to return a Bool to tell you whether it had actually been able to schedule the job). That's outside of the scope of this work though, I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense--just want to make sure that this is sufficiently specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants