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

Add possibility to set timeout #278

Open
seregayoga opened this issue Oct 16, 2017 · 5 comments
Open

Add possibility to set timeout #278

seregayoga opened this issue Oct 16, 2017 · 5 comments

Comments

@seregayoga
Copy link

It would be great to have a possibility to set a timeout to avoid workaround like this https://github.com/robertkrimen/otto#halting-problem

@deoxxa
Copy link
Collaborator

deoxxa commented Oct 16, 2017

I'm confused - you linked to the readme where it says exactly how to do what you want. I'm not sure what action you want someone to take.

@seregayoga
Copy link
Author

seregayoga commented Oct 16, 2017

As user of library I want to run vm without knowing about Interrupt channel. I just want to set timeout. So I offer solution for this issue in #277

@dotzero
Copy link

dotzero commented Oct 16, 2017

I have nothing against the solution that you provide in Readme, but I'm sure it's a bad idea to have it in our codebase.

It would be nice if it was a part of the library. So if there is a more elegant solution in the future, everyone who use it will have an updated version of solution.

@stevenh
Copy link
Collaborator

stevenh commented Nov 28, 2022

Is it something like the following which people are looking for:

vm.RunContext(ctx, `code here`)

@seregayoga
Copy link
Author

@stevenh nowadays I think this is a preferred API, yes.

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

Successfully merging a pull request may close this issue.

4 participants