summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2015-08-04 17:07:56 -0300
committerdrebs <drebs@leap.se>2015-08-04 17:26:06 -0300
commit5adddb8bc3fec1f0258659ca11a4f13f36210fa0 (patch)
treea878b65a70c979768515dd8528a161fcb99883ab /client/src/leap/soledad
parent957350b4a45953e2d39e34cfd78d6ee0b711e573 (diff)
[feat] add running state method to enc/dec pools
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/encdecpool.py7
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)