Is the GroovyScriptEngine thread-safe?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is the GroovyScriptEngine thread-safe?

Resolve Test
Hi All,

Is the GroovyScriptEngine thread-safe?

Thanks

Duke
Reply | Threaded
Open this post in threaded view
|

Re: Is the GroovyScriptEngine thread-safe?

Guillaume Laforge
Administrator
Hi Duke,

On 3/9/06, Duke Tantiprasut <[hidden email]> wrote:
> Is the GroovyScriptEngine thread-safe?

Looking at the source code, at first glance, it looks to be thread-safe.
Some synchronized map for the cache, and additional synchronize to
make sure the class cache isn't accessed in parallel. So I suspect
it's okay.
Did you encounter problems with it, that triggered the question?

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy
tog
Reply | Threaded
Open this post in threaded view
|

Re: Is the GroovyScriptEngine thread-safe?

tog
There has been the same question late january and tug's answer reach the same conclusion with the same arguments ;-) so I suspect it is threadsafe. Morever Jesper did not report further problem on this topic.

cheers
tog

On 3/9/06, Guillaume Laforge <[hidden email]> wrote:
Hi Duke,

On 3/9/06, Duke Tantiprasut <[hidden email]> wrote:
> Is the GroovyScriptEngine thread-safe?

Looking at the source code, at first glance, it looks to be thread-safe.
Some synchronized map for the cache, and additional synchronize to
make sure the class cache isn't accessed in parallel. So I suspect
it's okay.
Did you encounter problems with it, that triggered the question?

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

Reply | Threaded
Open this post in threaded view
|

Re: Is the GroovyScriptEngine thread-safe?

Jochen Theodorou
tog schrieb:
> There has been the same question late january and tug's answer reach the
> same conclusion with the same arguments ;-) so I suspect it is
> threadsafe. Morever Jesper did not report further problem on this topic.

there was a problem with ClassNodes, but it is fixed in jsr-05

bye blackdrag