i am trying to run the search in a twisted web application.
in my twisted resource i have:
def render_GET(self, request):
d = threads.deferToThread(self.processRequest, request)
return server.NOT_DONE_YET
this seems not to be compatible with PyLucene.
i also tryed running a PythonThread but i get another error:
eg:
def processRequest(self, request):
print "inside process Request"
t=PythonThread(target=self.doSearch, args=(request,))
print "Starting PyThread"
t.start()
t.join()
print "Done PyThread"
request.finish()
File "/usr/lib/python2.4/site-packages/PyLucene.py", line 3479, in start
assert (current.getName() == 'MainThread' or isinstance(current,
PythonThread)), "PythonThread can only be started from main thread of from
another PythonThread"
exceptions.AssertionError: PythonThread can only be started from main thread of
from another PythonThread
Any help would be very appreciated.
10x.
--
Catalin Constantin
Bounce Software
http://www.bounce-software.com
http://www.cabanova.ro
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev