I have created a class in which I store several large dictionaries and a method that takes as input a file and process it using the informations contained in the dictionaries.
Now, the total amount of files that I have to process is around 18000 so I opted to use a multiprocessing.dummy.Pool
in this way:
with dummy.Pool(processes=50) as pool:
failed = [x for x in pool.imap(export.get_uniref_uniprotkb_from_panproteome, species, chunksize=300)]
What I noticed in htop
is that the main process spawns correctly 50 threads but only one is in running state even I change the chunksize.