summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-09-02 09:04:43 +0200
committerJürg Billeter <j@bitron.ch>2019-09-03 11:17:28 +0200
commit6c1f5b99ea263c226f554c24ccb428cd8a664340 (patch)
tree374d6505de409b64f444a2ccc24d96d196c8ee8e
parent418c304de0ecebe588d5c80efac748b33c69cfbc (diff)
downloadbuildstream-6c1f5b99ea263c226f554c24ccb428cd8a664340.tar.gz
_context.py: Release artifactcache and sourcecache resources
-rw-r--r--src/buildstream/_context.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index 0d250eb56..9f6fdaf01 100644
--- a/src/buildstream/_context.py
+++ b/src/buildstream/_context.py
@@ -182,6 +182,12 @@ class Context():
# Called when exiting the with-statement context.
#
def __exit__(self, exc_type, exc_value, traceback):
+ if self._artifactcache:
+ self._artifactcache.release_resources()
+
+ if self._sourcecache:
+ self._sourcecache.release_resources()
+
if self._cascache:
self._cascache.release_resources(self.messenger)