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

Allow overriding sandbox execution timeout value for an individual guest function call #193

Closed
danbugs opened this issue Jan 29, 2025 · 1 comment
Labels

Comments

@danbugs
Copy link
Contributor

danbugs commented Jan 29, 2025

When creating an UninitializedSandbox, you can specify a maximum execution time for guest functions:

/// The max_execution_time of a guest execution in milliseconds. If set to 0, the max_execution_time
/// will be set to the default value of 1000ms if the guest execution does not complete within the time specified
/// then the execution will be cancelled, the minimum value is 1ms
///
/// Note: this is a C-compatible struct, so even though this optional
/// field should be represented as an `Option`, that type is not
/// FFI-safe, so it cannot be.
///
max_execution_time: u16,

This applies to all guest functions and there is currently no way of changing it after initialization. This issue proposes that we should allow users to override the sandbox default for individual guest function calls.

@syntactically
Copy link
Contributor

Closing in favour of #243, which will hopefully remove this timeout API entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants