A ThreadPoolExecutor inside a ProcessPoolExecutor
问题 I am new to the futures module and have a task that could benefit from parallelization; but I don't seem to be able to figure out exactly how to setup the function for a thread and the function for a process. I'd appreciate any help anyone can shed on the matter. I'm running a particle swarm optimization (PSO). Without getting into too much detail about PSO itself, here's the basic layout of my code: There is a Particle class, with a getFitness(self) method (which computes some metric and