summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-11-15 10:28:50 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-11-22 16:52:26 +0000
commite913a8a6d0cf7f7ef33869bb8d8f9e4c04fcc06a (patch)
treeac0ba6090edbe8ac58b61a0e187b35692f593bf7
parent95ee348004266cd92475a002f8bb55e7a705b9d5 (diff)
downloadbuildstream-e913a8a6d0cf7f7ef33869bb8d8f9e4c04fcc06a.tar.gz
CASCache: comment on need for __getstate__
-rw-r--r--src/buildstream/_cas/cascache.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index ac316ea25..98581d351 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -88,6 +88,11 @@ class CASCache:
self._cache_usage_monitor = _CASCacheUsageMonitor(self._casd_channel)
def __getstate__(self):
+ # Note that we can't use jobpickler's
+ # 'get_state_for_child_job_pickling' protocol here, since CASCache's
+ # are passed to subprocesses other than child jobs. e.g.
+ # test.utils.ArtifactShare.
+
state = self.__dict__.copy()
# Child jobs do not need to manage the CASD process, they only need a