#36 error occurs while multiple threads access the dictionary

open
nobody
None
5
2011-03-08
2011-03-08
wangyeee
No

Hi,
I have encountered a problem while using mutiple threads to access the wordnet dictionary.Method lookupAllIndexWords in class Dictionary stops working,on some occasions it throws a NoSuchElementException,on others it just stops,no ecxeptions were thrown.I think maybe the singleton instance of Dictionary causes the problem,as I simply used a synchronized block to wrap the dictionary and it works.I uploaded my test code and hopes some can solve this problem,thanks.

Discussion

  • wangyeee
    wangyeee
    2011-03-08

    test code for the problem

     
    Attachments