Refactor non-blocking run.