def _prepare_netqueue(self):
        """ Replaces the trajectory's service with a queue sender and starts the queue process.

        """
        self._logger.info('Starting Network Queue!')

        if not isinstance(self._port, compat.base_type):
            url = port_to_tcp(self._port)
            self._logger.info('Determined Server URL: `%s`' - url)
        else:
            url = self._port

        if self._queue is None:
            if hasattr(os, 'fork'):
                self._queue = ForkAwareQueuingClient(url)
            else:
                self._queue = QueuingClient(url)

        # Wrap a queue writer around the storage service
        queuing_server_handler = QueuingServer(url,
                                               self._storage_service,
                                               self._queue_maxsize,
                                               self._gc_interval)

        # Start the queue process
        self._queue_process = multip.Process(name='QueuingServerProcess', target=_wrap_handling,
                                             args=(dict(handler=queuing_server_handler,
                                                        logging_manager=self._logging_manager,
                                                        graceful_exit=self._graceful_exit),))
        self._queue_process.start()
        self._queue.start()

        # Replace the storage service of the trajectory by a sender.
        # The sender will put all data onto the queue.
        # The writer from above will receive the data from
        # the queue and hand it over to
        # the storage service
        self._queue_wrapper = QueueStorageServiceSender(self._queue)
        self._traj.v_storage_service = self._queue_wrapper
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/MultiprocContext._prepare_netqueue/operator `%` -> `-`