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
Hi, i'm new to this library (and ANTLR), but looking to add it to a project. I'm trying to understand how a Template instance should be used. Is it safe to parse a liquid string once and then use the single Template instance concurrently to render different strings?
e.g.
Template template = Template.parse(" hello, {{ name }}");
final ExecutorService executorService = Executors.newCachedThreadPool()
for (int i = 0; i < 10_000; i ++) {
executorService.submit(()-> template.render(Map.of("name", randomName())));
}
Thanks!
The text was updated successfully, but these errors were encountered:
We made a lot of effort in moving forward to that, but still, no.
Each render call redefine internal templateContext field, so it is not safe yet to use this in multi-threaded env.
Keeping this ticket open until it will be thread-safe.
Hi, i'm new to this library (and ANTLR), but looking to add it to a project. I'm trying to understand how a Template instance should be used. Is it safe to parse a liquid string once and then use the single Template instance concurrently to render different strings?
e.g.
Thanks!
The text was updated successfully, but these errors were encountered: