[ https://issues.apache.org/jira/browse/CTAKES-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620159#comment-13620159 ]
Kim Ebert commented on CTAKES-151: ---------------------------------- In my patch I convert the Out to be a local variable, but this still doesn't allow multiple threads to do a read at the same time. --- old/sources/gov/nih/nlm/nls/lvg/Api/LvgCmdApi.java 2013-01-09 23:10:44 +0000 +++ new/sources/gov/nih/nlm/nls/lvg/Api/LvgCmdApi.java 2013-01-10 01:05:39 +0000 @@ -43,6 +43,9 @@ public class LvgCmdApi extends SystemOption { // public constructor + + Out out = new Out(); + /** * Creates an LvgCmdApi object and initiate related data (default). * This constructor is consider as a preprocess method. @@ -290,10 +304,10 @@ */ public String MutateToString(String inTerm) throws Exception { - Out.ResetOutString(); + out.ResetOutString(); // Process the mutation on the input term Process(inTerm, true); - return Out.GetOutString(); + return out.GetOutString(); } > LVG is not thread safe for multiple instances inside of a single JVM. > --------------------------------------------------------------------- > > Key: CTAKES-151 > URL: https://issues.apache.org/jira/browse/CTAKES-151 > Project: cTAKES > Issue Type: Sub-task > Components: ctakes-lvg > Affects Versions: future enhancement, 3.0-incubating, 3.1-incubating > Reporter: Kim Ebert > Priority: Critical > Attachments: lvg_static_fix.patch > > > The LVG library is not thread safe. It uses global variables, so between > multiple instances, the data will become corrupted. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira