Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Groovy Scripts appear to shared across multiple threads, so modifications of the bindings and therefore execution of the groovy scripts must be synchronized. I suspect that other scripting engines might also suffer the same problem, but I don't have the time to stress-test them.
Solution: Make createContainerFromScript() synchronized.
Activity

Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.0 [ 10148 ] | |
Assignee | Michael Rimov [ rimovm ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
After skype session with Mauro, he has come up with a fix of creating new groovy script instances for each invocation and storing the precompiled class definition in state. For the record, on my machine the execution of a simple script including the new instantiation code is still 0 ms.