hacked pyjnius to fix threads