summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/_cas/cascache.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index af69e3d68..831229fe8 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -136,6 +136,14 @@ class CASCache():
if not (os.path.isdir(headdir) and os.path.isdir(objdir)):
raise CASCacheError("CAS repository check failed for '{}'".format(self.casdir))
+ # has_open_grpc_channels():
+ #
+ # Return whether there are gRPC channel instances. This is used to safeguard
+ # against fork() with open gRPC channels.
+ #
+ def has_open_grpc_channels(self):
+ return bool(self._casd_channel)
+
# notify_fork_disabled():
#
# Called by Context when fork() is disabled. This will enable communication