This is not to hard as your tiff_files are already a list, an important question is Does order matter - do the results have to be in the same order as the original files. If not
from multiprocessing import Pool
from multiprocessing import cpu_count
def handle_tiff(some_file):
data_open = gdal.Open(some_file)
data_array = data_open.ReadAsArray().astype(np.float32)
return data_array
tiff_files = glob.glob('*.tif')
p = Pool(cpu_count()- an_integer)
all_data = p.map(handle_tiff, tiff_files)
In the above code you can just use cpu_count without subtracting an integer.
In response to your question some_file is a path from the list tiff_files. Note so the p.map maps each item in the list tiff_files to the function handle_tiff and spawns some number of threads. The list is broken into discrete chunks and each chunk assigned to a different thread. Then the filepath's in each chunk are sequentially submitted to the function.