Concurrent engine usage ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Concurrent engine usage ?

Jan Goyvaerts
Just one simple question: Is it safe to share one instance of an engine with different threads ?

As it is mentioned creating engines is expensive I'd rather have one that is used concurrently. But I've got no clue whether this is supported.

Is it ?

TIA !

Jan
Reply | Threaded
Open this post in threaded view
|

Re: Concurrent engine usage ?

Zemi
Administrator
Yes, the TemplateEngine is intended to be shared among threads.

You could see it looking at the Spring integration, the TemplateEngine is a single object ("bean", or "singleton"
 in Spring vocabulary).

Reply | Threaded
Open this post in threaded view
|

Re: Concurrent engine usage ?

Jan Goyvaerts
Thank you for the speedy reply ! :-)

On Tue, Jan 8, 2013 at 3:51 PM, Zemi [via Thymeleaf - User Forum] <[hidden email]> wrote:
Yes, the TemplateEngine is intended to be shared among threads.

You could see it looking at the Spring integration, the TemplateEngine is a single object ("bean", or "singleton"
 in Spring vocabulary).




If you reply to this email, your message will be added to the discussion below:
http://forum.thymeleaf.org/Concurrent-engine-usage-tp4025472p4025476.html
To unsubscribe from Concurrent engine usage ?, click here.
NAML