On 2014-02-21 21:35, Stefan Lotties wrote: > Actually I did change all those code to the double-locking technique > because the IStemmer is not thread-safe. And I was pretty sure that > there's no problem with the double-locking technique. Damn it! Well, > now I know better. Thanks for hint.
I'm still note sure if all the recent changes were needed... the Wikipedia page says that double locking is broken only under Java <= 1.4, and it points to http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html which claims that simply adding 'volatile' will make it work (on Java 1.5 and later, which is the only thing we care about). Regards Daniel ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel