mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-06-21 15:43:21 +02:00
c10ba5c9c6
`multiprocessing.pool.Pool()` should be used as a context manager so Python can free its internal resources and do a proper cleanup.[1] While at it move the code to read the `compiler_commands.json` so the opened file can be closed before the sub-processes are fork()ed. Link: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool [1] Signed-off-by: Philipp Hahn <phahn-oss@avm.de> Link: https://patch.msgid.link/40180613bef84946c45d6fbeb4bb274573cd0beb.1778849135.git.phahn-oss@avm.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>