[pylucene-dev] detachCurrentThread crash

anurag uniyal anuraguniyal at yahoo.com
Mon Jan 14 02:56:47 PST 2008


Is it expected to explicity remove any references to local/class variables in threads?

Otherwise VM crashes. e.g.
-----------
import threading
import lucene
lucene.initVM(lucene.CLASSPATH)
def threadFunc():
    lucene.getVMEnv().attachCurrentThread()
    _store = lucene.FSDirectory.getDirectory("/tmp/index/", True)
    #_store = None # set to None to avoid crash!
    
    lucene.getVMEnv().detachCurrentThread()
def main():
    t = threading.Thread(target=threadFunc)
    t.start()
    t.join()
main()
----

I need to call detachCurrentThread because I use threads heavily andI will soon get out-of-memory error if didn't call detachCurrentThread.

rgds
Anurag


      Save all your chat conversations. Find them online at http://in.messenger.yahoo.com/webmessengerpromo.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20080114/be7ce18c/attachment.htm


More information about the pylucene-dev mailing list