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
# Python's asynchronous input-output framework speeds up IO-bound operations | |
# by allowing your python program to make progress on multiple IO-bound tasks | |
# concurrently. In this example, we load many neuroimaging data files and | |
# then perform a compute-intensive operation on each of them. Parallelizing the | |
# compute-intensive operation is beyond the scope of this tutorial. However, | |
# we can still get a big speed up by reading multiple files concurrently. While | |
# the program waits for the operating system to make progress on reading one | |
# file, it can work on computational transformation of another file. | |
# | |
# Loading a file asynchronously is straightforward. Here, we define a helper |
OlderNewer