I'm afraid your solution only works when using the development server,
and even then when used in auto_reload mode.
I think the easiest solution is to simply execute the functions
interfacing with pylucene in their own thread. something like:
def search(query):
 - delegate work to new pylucene thread
 - join it with current thread
 - do something with result

I guess you could even create a decorator for such functions
interfacing with pylucene..


On 26 mrt, 15:41, xav4django <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Solution found in pylucene-dev :
>
> changed django/utils/autoreload.py
> from:
> import thread
> to:
> import PyLucene.PythonThread as thread
>
> Norjee a écrit :
>
> > Pylucene has some threading issues (read incompatibilities with python
> > threads, it must be run from either the main thread, or its own thread
> > version).
>
> > The solution is rather simple, use it in its own separte thread. See
> > for example turbolucene,http://dev.krys.ca/turbolucene/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFGB8154dg3EDuiPUcRAjSEAJ9UCCcNK98gwCSsKA5cyTjUIs4axwCfa6Pa
> fzPgFykklqUxV8iridyKOqA=
> =3eai
> -----END PGP SIGNATURE-----


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to