[lit] Remove unnecessary indirection in progress_callback
On shutdown, the result complete handler is not racing with the main
thread anymore because we are now always waiting for process pool
termination via
```
finally:
pool.join()
```
diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index 4b91294..2fa8ebf 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -85,7 +85,7 @@
async_results = [
pool.apply_async(lit.worker.execute, args=[test],
- callback=self._process_completed)
+ callback=self.progress_callback)
for test in self.tests]
pool.close()
@@ -111,13 +111,6 @@
if self.failures == self.max_failures:
raise MaxFailuresError()
- def _process_completed(self, test):
- # Avoid racing with the main thread, which is going to terminate the
- # process pool soon.
- if self.failures == self.max_failures:
- return
- self.progress_callback(test)
-
# TODO(yln): interferes with progress bar
# Some tests use threads internally, and at least on Linux each of these
# threads counts toward the current process limit. Try to raise the (soft)