Skip to content

Commit

Permalink
fix windows python issue (freeze_support)
Browse files Browse the repository at this point in the history
  • Loading branch information
thehajime committed Dec 26, 2024
1 parent faf517b commit b20316d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions arch/lkl/scripts/headers_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,13 @@ def process_header(h):
print(" REPLACE\t%s" % (out_dir + "/" + os.path.basename(h)))
replace(h)

p = multiprocessing.Pool(args.jobs)
try:
p.map_async(process_header, headers).wait(999999)
p.close()
except:
p.terminate()
finally:
p.join()
if __name__ == '__main__':
multiprocessing.freeze_support()
p = multiprocessing.Pool(args.jobs)
try:
p.map_async(process_header, headers).wait(999999)
p.close()
except:
p.terminate()
finally:
p.join()

0 comments on commit b20316d

Please sign in to comment.