@@ -28,7 +28,7 @@ import json
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from . import util
|
from . import util
|
||||||
from .util import WalletFileException
|
from .util import WalletFileException, profiler
|
||||||
from .logging import Logger
|
from .logging import Logger
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@@ -272,6 +272,7 @@ class JsonDB(Logger):
|
|||||||
with self.lock:
|
with self.lock:
|
||||||
self._write(storage)
|
self._write(storage)
|
||||||
|
|
||||||
|
@profiler
|
||||||
def _write(self, storage: 'WalletStorage'):
|
def _write(self, storage: 'WalletStorage'):
|
||||||
if threading.current_thread().daemon:
|
if threading.current_thread().daemon:
|
||||||
self.logger.warning('daemon thread cannot write db')
|
self.logger.warning('daemon thread cannot write db')
|
||||||
|
|||||||
Reference in New Issue
Block a user