Mpall

with ProcessPoolExecutor(max_workers=self.args.workers) as executor: futures = {} for idx, replacements in enumerate(replacements_list): if self.cancel: break future = executor.submit( worker, idx, self.args.command, replacements, self.args.timeout, self.args.retries, env ) futures[future] = idx

mpall -c "process_file.py input output" -f replacements.txt -w 4 with ProcessPoolExecutor(max_workers=self

@dataclass class TaskResult: """Result of a single task execution.""" task_id: int args: Tuple success: bool stdout: str stderr: str exit_code: int duration: float retries: int timestamp: str = field(default_factory=lambda: datetime.now().isoformat()) with ProcessPoolExecutor(max_workers=self

# Test 2: With retries (simulate failure) ./mpall.py -c "sh -c 'exit code'" -r code=0 -r code=1 --retries 2 with ProcessPoolExecutor(max_workers=self