diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/leap/soledad/client/encdecpool.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/encdecpool.py b/client/src/leap/soledad/client/encdecpool.py index a0154929..b8805e12 100644 --- a/client/src/leap/soledad/client/encdecpool.py +++ b/client/src/leap/soledad/client/encdecpool.py @@ -67,17 +67,24 @@ class SyncEncryptDecryptPool(object): self._sync_db = sync_db self._pool = None self._delayed_call = None + self._started = False def start(self): self._create_pool() + self._started = True def stop(self): + self._started = False self._destroy_pool() # maybe cancel the next delayed call if self._delayed_call \ and not self._delayed_call.called: self._delayed_call.cancel() + @property + def running(self): + return self._started + def _create_pool(self): self._pool = multiprocessing.Pool(self.WORKERS) |