[PATCH] D58196: [lit][NFC] Small cleanup
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 13 11:27:41 PST 2019
rnk added inline comments.
================
Comment at: llvm/utils/lit/lit/run.py:196
if pg:
semaphore = parallelism_semaphores[pg]
semaphore.acquire()
----------------
Won't we get an unbound local error now if parallelism_semaphores[pg] raises KeyError? I would expect this to raise, hit the except block, then run the finally, where it would raise again.
================
Comment at: llvm/utils/lit/lit/run.py:199
semaphore = parallelism_semaphores[pg]
- if semaphore:
semaphore.acquire()
----------------
I agree this check seems unnecessary. It seems like it would be a bug to insert None as a value in the parallelism_semaphores dict.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58196/new/
https://reviews.llvm.org/D58196
More information about the llvm-commits
mailing list