def _prepare_pipe(self):
        if self._pipe is None:
            self._pipe = multip.Pipe(True)
        if self._lock is None:
            self._lock = multip.Lock()

        self._logger.info('Starting the Storage Pipe!')
        # Wrap a queue writer around the storage service
        pipe_handler = PipeStorageServiceWriter(self._storage_service, self._pipe[0],
                                                max_buffer_size=self._max_buffer_size)

        # Start the queue process
        self._pipe_process = multip.Process(name='PipeProcess', target=_wrap_handling,
                                             args=(dict(handler=pipe_handler,
                                                        logging_manager=self._logging_manager,
                                                        graceful_exit=self._graceful_exit),))
        self._pipe_process.start()

        # Replace the storage service of the trajectory by a sender.
        # The sender will put all data onto the pipe.
        # The writer from above will receive the data from
        # the pipe and hand it over to
        # the storage service
        self._pipe_wrapper = PipeStorageServiceSender(self._pipe[1], self._lock)
        self._traj.v_storage_service = self._pipe_wrapper
Replaces the trajectory's service with a queue sender and starts the queue process.
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/MultiprocContext._prepare_pipe