This commit is contained in:
ed 2023-07-21 00:36:37 +00:00
parent 0778da6c4d
commit 9eaa9904e0
5 changed files with 45 additions and 5 deletions

View file

@ -69,8 +69,13 @@ def uncomment(fpath):
def main():
print("uncommenting", end="", flush=True)
try:
if sys.argv[1] == "1":
sys.argv.remove("1")
raise Exception("disabled")
import multiprocessing as mp
mp.set_start_method("spawn", True)
with mp.Pool(os.cpu_count()) as pool:
pool.map(uncomment, sys.argv[1:])
except Exception as ex: