client = SentinelhubClient(cache_dir=self.cache_dir)
requests = (request_from_date(request, date) for date in dates)
images = (client.get(req, headers=headers) for req in requests)
images = [tar_to_numpy(img) for img in images]
eopatch = EOPatch() if eopatch is None else eopatch
After Change
requests = [request_from_date(request, date) for date in dates]
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
responses = [executor.submit(client.get, request, headers=headers) for request in requests]
images = [response.result() for response in responses]