You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, we have no way of canceling vm.EvaluateAnonymousSnippet and similar functions. Because of this, there are several things that can't be done:
Racing multiple JsonNet evaluations against each other, taking the first result, and canceling the rest.
Kill long-running JsonNet evaluations. It is possible to build very slow JsonNet code with array comprehensions, infinite loops, and recursion. There is currently no way of killing such a script after X seconds or X MB of ram used.
There is a workaround such as sending SIGINT on the process, that however requires to execute each JsonNet snippet in a separate process, which is not feasable if thousands or millions of JsonNet executions have to be done per second.
For these reasons, it would be great if this library supported evaluation with contexts, for example:
This isn't the first time that context handling was added to existing libraries this way - I think that's even the case for some of Go's stdlib functions.
Is this something you would consider being in the library? If so, we can also try to contribute such changes.
The text was updated successfully, but these errors were encountered:
At the moment, we have no way of canceling
vm.EvaluateAnonymousSnippet
and similar functions. Because of this, there are several things that can't be done:There is a workaround such as sending SIGINT on the process, that however requires to execute each JsonNet snippet in a separate process, which is not feasable if thousands or millions of JsonNet executions have to be done per second.
For these reasons, it would be great if this library supported evaluation with contexts, for example:
This isn't the first time that context handling was added to existing libraries this way - I think that's even the case for some of Go's stdlib functions.
Is this something you would consider being in the library? If so, we can also try to contribute such changes.
The text was updated successfully, but these errors were encountered: