diff options
author | Jürg Billeter <j@bitron.ch> | 2019-09-02 12:25:01 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-09-03 11:17:28 +0200 |
commit | 0963264d0021a9a0121ff769748814acbf1b8ff7 (patch) | |
tree | ac9b526f046902b8000dd27a5f02bfc963d5ab26 | |
parent | 2ce01dafc17a8ead15f95a3ae11954d8b7839cc2 (diff) | |
download | buildstream-0963264d0021a9a0121ff769748814acbf1b8ff7.tar.gz |
cascache.py: Remove fork_disabled mechanism
The fork safeguard is now handled by Context.is_fork_allowed().
-rw-r--r-- | src/buildstream/_cas/cascache.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index 831229fe8..21c9f0ad6 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -86,7 +86,6 @@ class CASCache(): self._casd_channel = None self._local_cas = None - self._fork_disabled = False def __getstate__(self): state = self.__dict__.copy() @@ -102,9 +101,6 @@ class CASCache(): assert self._casd_process, "CASCache was instantiated without buildbox-casd" if not self._local_cas: - # gRPC doesn't support fork without exec, which is used in the main process. - assert self._fork_disabled or not utils._is_main_process() - self._casd_channel = grpc.insecure_channel('unix:' + self._casd_socket_path) self._local_cas = local_cas_pb2_grpc.LocalContentAddressableStorageStub(self._casd_channel) @@ -144,14 +140,6 @@ class CASCache(): 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 - # with casd via gRPC in the main process. - # - def notify_fork_disabled(self): - self._fork_disabled = True - # release_resources(): # # Release resources used by CASCache. |