def start_launch_servide_process(ld): """Starts a Launch Service process. To be called from subclasses. Args: ld : LaunchDescription obj. """ # Create the LauchService and feed the LaunchDescription obj. to it. ls = LaunchService() ls.include_launch_description(ld) p = Process(target=ls.run) p.daemon = True #The daemon process is terminated automatically before the main program exits, to avoid leaving orphaned processes running p.start()
def startLaunchServiceProcess(launchDesc): """Starts a Launch Service process. To be called from subclasses. Args: launchDesc : LaunchDescription obj. """ # Create the LauchService and feed the LaunchDescription obj. to it. launchService = LaunchService() launchService.include_launch_description(launchDesc) process = Process(target=launchService.run) # The daemon process is terminated automatically before the main program exits, # to avoid leaving orphaned processes running process.daemon = True process.start() return process
def test_value(self, raw=False): if raw: values = [RawValue(code, value) for code, value, _ in self.codes_values] else: values = [Value(code, value) for code, value, _ in self.codes_values] for sv, cv in zip(values, self.codes_values): assert sv.value == cv[1] proc = Process(target=self._test, args=(values,)) proc.daemon = True proc.start() proc.join() for sv, cv in zip(values, self.codes_values): assert sv.value == cv[2]
def test_value(self, raw=False): if raw: values = [ RawValue(code, value) for code, value, _ in self.codes_values ] else: values = [ Value(code, value) for code, value, _ in self.codes_values ] for sv, cv in zip(values, self.codes_values): assert sv.value == cv[1] proc = Process(target=self._test, args=(values, )) proc.daemon = True proc.start() proc.join() for sv, cv in zip(values, self.codes_values): assert sv.value == cv[2]