[pylucene-dev] patch JvAttachCurrentThread

Andi Vajda vajda at osafoundation.org
Mon Apr 2 11:28:42 PDT 2007


On Mon, 2 Apr 2007, xav4django wrote:

> Patch pour _PyLucene avec method JvAttachCurrentThread2 :
> http://www.1et0.org/admin/db/pylucene/trypatch/patch.txt
>
>  This patch correct a thread problem,

What thread problem does it correct ?
Can one use threads without PyLucene.PythonThread now ?

> +static PyObject *JvAttachCurrentThread1(void){
> +  JvCreateJavaVM(NULL);
> +  JvAttachCurrentThread(NULL, NULL);
> +  return Py_None;
> +}

You shouldn't need to call JvCreateJavaVM() again. It's already called in 
PyLucene's in init at import time.

Andi..


More information about the pylucene-dev mailing list