def _prepare_queue(self):
if self._queue is None:<EOL><INDENT>if self._use_manager:<EOL><INDENT>if self._manager is None:<EOL><INDENT>self._manager = multip.Manager()<EOL><DEDENT>self._queue = self._manager.Queue(maxsize=self._queue_maxsize)<EOL><DEDENT>else:<EOL><INDENT>self._queue = multip.Queue(maxsize=self._queue_maxsize)<EOL><DEDENT><DEDENT>self._logger.info('<STR_LIT>')<EOL>queue_handler = QueueStorageServiceWriter(self._storage_service, self._queue,<EOL>self._gc_interval)<EOL>self._queue_process = multip.Process(name='<STR_LIT>', target=_wrap_handling,<EOL>args=(dict(handler=queue_handler,<EOL>logging_manager=self._logging_manager,<EOL>graceful_exit=self._graceful_exit),))<EOL>self._queue_process.start()<EOL>self._queue_wrapper = QueueStorageServiceSender(self._queue)<EOL>self._traj.v_storage_service = self._queue_wrapper<EOL>
Replaces the trajectory's service with a queue sender and starts the queue process.