groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: Re-entrant and multi-entrant Groovy calls
Date Fri, 20 Apr 2018 11:34:17 GMT

Am 20.04.2018 um 11:21 schrieb Blake McBride:
> Greetings,
> Does Groovy safely support re-entrant and multi-entrant calls?  What I 
> mean by that is the following:
> Re-entrant:  on a single OS thread - my Java program calls into Groovy, 
> then Groovy calls into my Java application, and then the Java 
> application calls back into Groovy.  So the stack has Java, Groovy, 
> JAVA, and then Groovy again.
> Multi-entrant:  my Java application has many threads.  One of my threads 
> calls into Groovy.  Then, while one thread is still in Groovy, another 
> thread evokes Groovy.  So now we have two calls into Groovy by two 
> independent Java/OS threads running at the same time.

this is actually difficult to answer. The runtime system is designed to 
be safe for multi entrant usages (minus bugs of course). But just like 
in Java that does not mean all parts of the API are safe for this usage, 
not even groovy.lang

bye Jochen

View raw message