diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-11-15 10:28:50 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-11-22 16:52:26 +0000 |
commit | e913a8a6d0cf7f7ef33869bb8d8f9e4c04fcc06a (patch) | |
tree | ac0ba6090edbe8ac58b61a0e187b35692f593bf7 /src | |
parent | 95ee348004266cd92475a002f8bb55e7a705b9d5 (diff) | |
download | buildstream-e913a8a6d0cf7f7ef33869bb8d8f9e4c04fcc06a.tar.gz |
CASCache: comment on need for __getstate__
Diffstat (limited to 'src')
-rw-r--r-- | src/buildstream/_cas/cascache.py | 5 |
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 |