tsynchronizer: offload cpu-heavy address generation to other thread - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 129460857132fdf23978544cb14b810a06394914 DIR parent 172ddf4aaf2ecef6a897dd205da075f550acab1b HTML Author: SomberNight <somber.night@protonmail.com> Date: Thu, 20 Sep 2018 20:16:03 +0200 synchronizer: offload cpu-heavy address generation to other thread Diffstat: M electrum/synchronizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/synchronizer.py b/electrum/synchronizer.py t@@ -25,7 +25,7 @@ import asyncio import hashlib -from aiorpcx import TaskGroup +from aiorpcx import TaskGroup, run_in_thread from .transaction import Transaction from .util import bh2u, PrintError t@@ -180,7 +180,7 @@ class Synchronizer(PrintError): # main loop while True: await asyncio.sleep(0.1) - self.wallet.synchronize() + await run_in_thread(self.wallet.synchronize) up_to_date = self.is_up_to_date() if (up_to_date != self.wallet.is_up_to_date() or up_to_date and self._processed_some_notifications):