-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyjnius is still not thread-safe? #71
Comments
I seem to have a similar problem. Trying to run a task through celery I get a "VM is already running, can't set classpath" Problem. Do you have a solution for running pyjnius in celery? |
same issue, anyone found an answer? |
the error "VM is already running, can't set classpath" means one of imported packages is using JVM. so i think there will be multiple lines that imports jnius. please show your code lines of importing packages or if there are lines like "import jnius" and "import [package_name_A]" |
@jun0-ds's solution [i.e. avoid importing the same class twice] isn't a conventional way of using Python. Importing twice shouldn't lead to problems. It suggests that the |
Hi, All
I have to invoke a static java method in my task(django-celery) through pyjnius. It works fine for the first task. But it throws exception while executing the 2nd task. Check the jvm log, it shows
Internal exceptions (1 events):
Event: 0.058 Thread 0x0000000001ae2800 Threw 0x0000000704a06140 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jni.cpp:3994
Seems this is thread problem, right?
How can i fix this?
BTW, misja, can i make it works through gevent?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1362782-pyjnius-is-still-not-thread-safe?utm_campaign=plugin&utm_content=tracker%2F77133&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F77133&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: