diff options
author | drebs <drebs@leap.se> | 2015-08-04 17:07:56 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-08-04 17:26:06 -0300 |
commit | 5adddb8bc3fec1f0258659ca11a4f13f36210fa0 (patch) | |
tree | a878b65a70c979768515dd8528a161fcb99883ab /client | |
parent | 957350b4a45953e2d39e34cfd78d6ee0b711e573 (diff) |
[feat] add running state method to enc/dec pools
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) |