Python并发编程之线程池/进程池

at 0x7f0b06352ba8 state=finished returned str>,<Future at 0x7f0b06373b00 state=finished returned str>}, not_done=set())

如果采用FIRST_COMPLETED参数,程序并不会等到线程池里面所有的任务都完成。

ziwenxie :: ~ » python example5.pyDoneAndNotDoneFutures(done={<Future at 0x7f84109edb00 state=finished returned str>,<Future at 0x7f840e2e9320 state=finished returned str>,<Future at 0x7f840f25ccc0 state=finished returned str>},not_done={<Future at 0x7f840e2e9ba8 state=running>,<Future at 0x7f840e2e9940 state=running>})