Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink: cancellation, timeouts, accounting #243

Open
syntactically opened this issue Feb 5, 2025 · 0 comments
Open

Rethink: cancellation, timeouts, accounting #243

syntactically opened this issue Feb 5, 2025 · 0 comments

Comments

@syntactically
Copy link
Contributor

Currently, we have a strange set of primitives around cancellation and accounting, which mostly revolve around configuring a wall-clock "timeout" for a sandbox invocation, and then automatically killing it after that much time. We should endeavour to provide a more natural API, focused on the individual operations that need to be support in order to allow hosts to build their own cancellation logic; in particular:

  • Rather than the current timeout-then-kill operation, we should expose a kill operation that can be run by the host from another thread or interrupt context
  • We should expose CPU-time accounting metrics for a sandbox's total lifetime and for a single function call, including the ability to deliver interrupts to the host when selected CPU time thresholds are met.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants