

(Python) Parallelism in one line - chishaku
https://medium.com/@thechriskiehl/parallelism-in-one-line-40e9b2b36148

======
towelguy
For python 3 there's also concurrent.futures:

    
    
        from concurrent.futures import ThreadPoolExecutor
        ...
        with ThreadPoolExecutor(max_workers=4) as executor:
            executor.map(create_thumbnail, images)

------
onuryavuz
I've just tried and it works perfectly.

Any suggestions to decide on number of threads other than trial and error ?

