-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
Patch pour _PyLucene avec method JvAttachCurrentThread2 :
http://www.1et0.org/admin/db/pylucene/trypatch/patch.txt
This patch correct a thread problem,
but not the problem with mod_pyhon.
Sample with thread problem correction with shell
This version bug :
python manage.py shell < testthread.py
This version is ok with a PyLucene.JvAttachCurrentThread2()
python manage.py shell < testthread3.py
scripts are here :
http://www.1et0.org/admin/db/pylucene/trypatch/testt
hread.py
http://www.1et0.org/admin/db/pylucene/trypatch/test
thread3.py
But when I use PyLucene.JvAttachCurrentThread2()
in mod_python, it's change nothing.
Another idea ?
Xav (xav 1et0.org)
============================================================
=========
diff -aburN original/_PyLucene.cpp modified/_PyLucene.cpp
- --- original/_PyLucene.cpp 2007-04-02
19:31:25.000000000 +0200
+++ modified/_PyLucene.cpp 2007-04-02
19:31:41.000000000 +0200
 -221,8
+221,18 
return PyInt_FromLong(pythonRefs->size());
}
+
+
+
+static PyObject *JvAttachCurrentThread1(void){
+ JvCreateJavaVM(NULL);
+ JvAttachCurrentThread(NULL, NULL);
+ return Py_None;
+}
+
static PyMethodDef pylucene_funcs[] = {
{ "dumpRefs", (PyCFunction) dumpRefs, 0,
"" },
+ {"JvAttachCurrentThread2",(PyCFunction)
JvAttachCurrentThread1,
METH_NOARGS, "wrapper attach current thread"},
{ NULL, NULL, 0, NULL }
};
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGEUlD4dg3EDuiPUcRAtMYAKCFc59M2Y7xCJMx53KU5RNgEeTifgCf
Sxt/
qPb/4ERPyj6azOzqi9zTueg=
=Djti
-----END PGP SIGNATURE-----
_______________________________________________
pylucene-dev mailing list
pylucene-dev osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev
|