question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyjnius is not thread-safe

See original GitHub issue

The following results in a core dump:

import threading
from jnius import autoclass

class MyThread(threading.Thread):
    def run(self):
        autoclass('java.lang.System').out.println('Hello world')

for i in range(2):
    MyThread().start()

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
titocommented, Jul 2, 2013

Pyjnius is now thread safe.

0reactions
NewAge12commented, May 18, 2022

Anyone had any luck getting threading to work on android??

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - pyjnius is still not thread-safe? - - Bountysource
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...
Read more >
Pyjnius - 'Only the original thread that created a view hierarchy ...
You need something like the following (not tested): from kivy.app import App from kivy.uix.relativelayout import RelativeLayout from jnius ...
Read more >
Working on Android — python-for-android 0.1 documentation
This method is not thread-safe. ... Pyjnius lets you call the Android API directly from Python Pyjnius is works by dynamically wrapping Java...
Read more >
Python API — python-for-android 0.1 ドキュメント - GitHub Pages
Most of the Java API is also accessible with PyJNIus, so if you can't find what you need here you can try using...
Read more >
kivy Changelog - pyup.io
python2legacy - various warnings then no valid dependency graphs [\1582](https://github.com/kivy/python-for-android/issues/1582) - pyjnius import crash ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found