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

Runtime timeout #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Runtime timeout #1

wants to merge 3 commits into from

Conversation

lateefj
Copy link
Owner

@lateefj lateefj commented May 22, 2019

Goal

For embedded use cases it is really helpful to have a limit on the amount of time a script takes to run. As there has already been sandbox configuration for file read/write/execute which would be critical for embedding in an app. If all IO is disabled then this feature should provide some amount of sandboxing of runtime.

Implementation

This adds a runtime duration to running a program. It uses time.Since on any call to interp.eval.

IO Issue

On question is how to set timeout for IO operations. Currently this is not supported. Not sure there is a really good option for this. Possibly exposing the a function that can check for runtime limitations might help with embedded use cases.

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