handling pending_ops correctly in run_jobs in case of multiple processes running simultaneously