Код: Выделить всё
with concurrent.futures.ThreadPoolExecutor() as executor:
length = len(self.seq)
futures = [None] * length
results = []
for i in range(length):
f,args,kwargs = self.seq[i]
future = executor.submit(f, *args, **kwargs)
futures[i] = future
for f in concurrent.futures.as_completed(starts):
results.append(f.result())
Подробнее здесь: https://stackoverflow.com/questions/791 ... urrent-fut