Created
August 10, 2014 06:50
-
-
Save sanfx/835ca3b4efb19606e42c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from concurrent.futures import ProcessPoolExecutor | |
| def calculate(number): | |
| return number | |
| with ProcessPoolExecutor() as executor: | |
| result = executor.map(calculate, range(4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment