From e913a8a6d0cf7f7ef33869bb8d8f9e4c04fcc06a Mon Sep 17 00:00:00 2001 From: Angelos Evripiotis Date: Fri, 15 Nov 2019 10:28:50 +0000 Subject: CASCache: comment on need for __getstate__ --- src/buildstream/_cas/cascache.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -- cgit v1.2.1