and especially with the below lines of code:
ctx = multiprocessing.get_context('spawn')
pool = ctx.Pool(nprocesses)
processes = [p.pid for p in pool._pool]
for pid in processes:
p = psutil.Process(pid)
p.nice(5)
pool_results = pool.map(process_chunk, input_chunk)
pool.close()
When setting the niceness value for the process (process was created using multiprocessing), code is throwing the below error:
Could you please confirm if this is Bug? If not, could anyone please help me in fixing me this error. Thank you.
Summary
Description
I am running the code available in this Git Repo: https://github.com/Merck/Line-of-Therapy-Algorithm/blob/master/Python/rwToT_LoT_main_parallel.py
and especially with the below lines of code: ctx = multiprocessing.get_context('spawn') pool = ctx.Pool(nprocesses) processes = [p.pid for p in pool._pool] for pid in processes: p = psutil.Process(pid) p.nice(5) pool_results = pool.map(process_chunk, input_chunk) pool.close()
When setting the niceness value for the process (process was created using multiprocessing), code is throwing the below error:
Could you please confirm if this is Bug? If not, could anyone please help me in fixing me this error. Thank you.