[lit][NFC] Cleanup lit worker process handling
authorJulian Lettner <jlettner@apple.com>
Sat, 16 Feb 2019 00:40:40 +0000 (00:40 +0000)
committerJulian Lettner <jlettner@apple.com>
Sat, 16 Feb 2019 00:40:40 +0000 (00:40 +0000)
commit0d15bb5d33836ea776d5fa05790bc1ce397a97cf
tree70d5653606147f1a4a8d66742bee22fe49da365d
parent312af158b0b866fcde2d9d2c8cae8fc6ed8942bb
[lit][NFC] Cleanup lit worker process handling

Move code that is executed on worker process to separate file. This
makes the use of the pickled arguments stored in global variables in the
worker a bit clearer. (Still not pretty though.)

Extract handling of parallelism groups to it's own function.

Use BoundedSemaphore instead of Semaphore. BoundedSemaphore raises for
unmatched release() calls.

Cleanup imports.

Differential Revision: https://reviews.llvm.org/D58196

llvm-svn: 354187
llvm/utils/lit/lit/run.py
llvm/utils/lit/lit/util.py
llvm/utils/lit/lit/worker.py [new file with mode: 0644]