electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 9295d5257bf93b397443ca169e4932528a5d4078
parent 93ebe9cb2294868250fcbb0ed1afcb97fb93b93b
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 24 Oct 2016 12:12:04 +0200

kivy: add thread wrapper calling jnius.detach()

Diffstat:
Mgui/kivy/__init__.py | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/gui/kivy/__init__.py b/gui/kivy/__init__.py @@ -41,6 +41,25 @@ kivy.require('1.8.0') from kivy.logger import Logger from main_window import ElectrumWindow +# from https://gist.github.com/tito/09c42fb4767721dc323d +import threading +try: + import jnius +except: + jnius = None + +if jnius: + orig_thread_run = threading.Thread.run + def thread_check_run(*args, **kwargs): + try: + return orig_thread_run(*args, **kwargs) + finally: + #print "jnius detach", threading.currentThread() + jnius.detach() + threading.Thread.run = thread_check_run + + + class ElectrumGui: def __init__(self, config, daemon, plugins):